Skip to content

Commit

Permalink
tools: update broken types in type parser
Browse files Browse the repository at this point in the history
The links for the ArrayBufferView and WebAssembly.Instance types
appear to be broken. This commit updates them to point to the
correct MDN locations.

PR-URL: #33068
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and targos committed May 13, 2020
1 parent 6a9f867 commit b9d9c24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/doc/type-parser.js
Expand Up @@ -15,20 +15,25 @@ const jsPrimitives = {

const jsGlobalObjectsUrl = `${jsDocPrefix}Reference/Global_Objects/`;
const jsGlobalTypes = [
'Array', 'ArrayBuffer', 'ArrayBufferView', 'DataView', 'Date', 'Error',
'Array', 'ArrayBuffer', 'DataView', 'Date', 'Error',
'EvalError', 'Function', 'Map', 'Object', 'Promise', 'RangeError',
'ReferenceError', 'RegExp', 'Set', 'SharedArrayBuffer', 'SyntaxError',
'TypeError', 'TypedArray', 'URIError', 'Uint8Array', 'WebAssembly.Instance',
'TypeError', 'TypedArray', 'URIError', 'Uint8Array',
];

const customTypesMap = {
'any': `${jsDataStructuresUrl}#Data_types`,

'this': `${jsDocPrefix}Reference/Operators/this`,

'ArrayBufferView':
'https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView',

'AsyncIterator': 'https://tc39.github.io/ecma262/#sec-asynciterator-interface',

'bigint': `${jsDocPrefix}Reference/Global_Objects/BigInt`,
'WebAssembly.Instance':
`${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`,

'Iterable':
`${jsDocPrefix}Reference/Iteration_protocols#The_iterable_protocol`,
Expand Down

0 comments on commit b9d9c24

Please sign in to comment.