Skip to content

Commit 3452cf2

Browse files
authored
doc: make MDN links to global classes more consistent (#190)
1 parent 1c86005 commit 3452cf2

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

src/constants.mjs

+11-21
Original file line numberDiff line numberDiff line change
@@ -125,27 +125,17 @@ export const DOC_SLUG_ENVIRONMENT = 'environment-variables-1';
125125
// JavaScript globals types within the MDN JavaScript docs
126126
// @see DOC_MDN_BASE_URL_JS_GLOBALS
127127
export const DOC_TYPES_MAPPING_GLOBALS = {
128-
AggregateError: 'AggregateError',
129-
Array: 'Array',
130-
ArrayBuffer: 'ArrayBuffer',
131-
DataView: 'DataView',
132-
Date: 'Date',
133-
Error: 'Error',
134-
EvalError: 'EvalError',
135-
Function: 'Function',
136-
Map: 'Map',
137-
Object: 'Object',
138-
Promise: 'Promise',
139-
RangeError: 'RangeError',
140-
ReferenceError: 'ReferenceError',
141-
RegExp: 'RegExp',
142-
Set: 'Set',
143-
SharedArrayBuffer: 'SharedArrayBuffer',
144-
SyntaxError: 'SyntaxError',
145-
TypeError: 'TypeError',
146-
TypedArray: 'TypedArray',
147-
URIError: 'URIError',
148-
Uint8Array: 'Uint8Array',
128+
...Object.fromEntries([
129+
'AggregateError', 'Array', 'ArrayBuffer', 'DataView', 'Date', 'Error',
130+
'EvalError', 'Function', 'Map', 'NaN', 'Object', 'Promise', 'Proxy', 'RangeError',
131+
'ReferenceError', 'RegExp', 'Set', 'SharedArrayBuffer', 'SyntaxError', 'Symbol',
132+
'TypeError', 'URIError', 'WeakMap', 'WeakSet',
133+
134+
'TypedArray',
135+
'Float32Array', 'Float64Array',
136+
'Int8Array', 'Int16Array', 'Int32Array',
137+
'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array',
138+
].map(e => [e, e])),
149139
bigint: 'BigInt',
150140
'WebAssembly.Instance': 'WebAssembly/Instance',
151141
};

0 commit comments

Comments
 (0)