Skip to content

Commit b15070b

Browse files
tools,doc: update JavaScript primitive types to match MDN Web Docs
- Update primitive types to lower case, so the anchor of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Data_structures will work correctly. - Add `bigint` to primitive types to match MDN Web Doc. PR-URL: #60581 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Claudio Wunder <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 9f01ff2 commit b15070b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tools/doc/type-parser.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ const jsDocPrefix = `${mdnPrefix}/JavaScript/`;
33

44
const jsDataStructuresUrl = `${jsDocPrefix}Data_structures`;
55
const jsPrimitives = {
6-
boolean: 'Boolean',
7-
integer: 'Number', // Not a primitive, used for clarification.
8-
null: 'Null',
9-
number: 'Number',
10-
string: 'String',
11-
symbol: 'Symbol',
12-
undefined: 'Undefined',
6+
boolean: 'boolean',
7+
integer: 'number', // Not a primitive, used for clarification.
8+
null: 'null',
9+
number: 'number',
10+
string: 'string',
11+
symbol: 'symbol',
12+
undefined: 'undefined',
13+
bigint: 'bigint',
1314
};
1415

1516
const jsGlobalObjectsUrl = `${jsDocPrefix}Reference/Global_Objects/`;
@@ -43,7 +44,6 @@ const customTypesMap = {
4344

4445
'AsyncGeneratorFunction': 'https://tc39.es/proposal-async-iteration/#sec-asyncgeneratorfunction-constructor',
4546

46-
'bigint': `${jsDocPrefix}Reference/Global_Objects/BigInt`,
4747
'WebAssembly.Instance':
4848
`${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`,
4949
'WebAssembly.Memory':

0 commit comments

Comments
 (0)