Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: prefer symbol to number in webidl type function #55737

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions lib/internal/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {
ObjectPrototypeIsPrototypeOf,
SafeSet,
String,
Symbol,
SymbolIterator,
TypeError,
} = primordials;
Expand All @@ -30,14 +31,14 @@ const { kEmptyObject } = require('internal/util');

const converters = { __proto__: null };

const UNDEFINED = 1;
const BOOLEAN = 2;
const STRING = 3;
const SYMBOL = 4;
const NUMBER = 5;
const BIGINT = 6;
const NULL = 7;
const OBJECT = 8;
const UNDEFINED = Symbol('undefined');
const BOOLEAN = Symbol('boolean');
const STRING = Symbol('string');
const SYMBOL = Symbol('symbol');
const NUMBER = Symbol('number');
const BIGINT = Symbol('bigint');
const NULL = Symbol('null');
const OBJECT = Symbol('object');

/**
* @see https://webidl.spec.whatwg.org/#es-any
Expand Down
Loading