Skip to content

Commit

Permalink
lib: prefer symbol to number in webidl type function
Browse files Browse the repository at this point in the history
PR-URL: #55737
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: LiviaMedeiros <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jason Zhang <[email protected]>
  • Loading branch information
aduh95 authored and ruyadorno committed Nov 27, 2024
1 parent 18f0f07 commit ee17fcd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/internal/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const {
ObjectAssign,
SafeSet,
String,
Symbol,
SymbolIterator,
TypeError,
} = primordials;
Expand All @@ -28,14 +29,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

0 comments on commit ee17fcd

Please sign in to comment.