Skip to content

Commit

Permalink
doc: make MDN links to global classes more consistent (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Feb 7, 2025
1 parent 1c86005 commit 3452cf2
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions src/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,17 @@ export const DOC_SLUG_ENVIRONMENT = 'environment-variables-1';
// JavaScript globals types within the MDN JavaScript docs
// @see DOC_MDN_BASE_URL_JS_GLOBALS
export const DOC_TYPES_MAPPING_GLOBALS = {
AggregateError: 'AggregateError',
Array: 'Array',
ArrayBuffer: 'ArrayBuffer',
DataView: 'DataView',
Date: 'Date',
Error: 'Error',
EvalError: 'EvalError',
Function: 'Function',
Map: 'Map',
Object: 'Object',
Promise: 'Promise',
RangeError: 'RangeError',
ReferenceError: 'ReferenceError',
RegExp: 'RegExp',
Set: 'Set',
SharedArrayBuffer: 'SharedArrayBuffer',
SyntaxError: 'SyntaxError',
TypeError: 'TypeError',
TypedArray: 'TypedArray',
URIError: 'URIError',
Uint8Array: 'Uint8Array',
...Object.fromEntries([
'AggregateError', 'Array', 'ArrayBuffer', 'DataView', 'Date', 'Error',
'EvalError', 'Function', 'Map', 'NaN', 'Object', 'Promise', 'Proxy', 'RangeError',
'ReferenceError', 'RegExp', 'Set', 'SharedArrayBuffer', 'SyntaxError', 'Symbol',
'TypeError', 'URIError', 'WeakMap', 'WeakSet',

'TypedArray',
'Float32Array', 'Float64Array',
'Int8Array', 'Int16Array', 'Int32Array',
'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array',
].map(e => [e, e])),
bigint: 'BigInt',
'WebAssembly.Instance': 'WebAssembly/Instance',
};
Expand Down

0 comments on commit 3452cf2

Please sign in to comment.