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 4, 2020
1 parent 4423304 commit 8c40ffc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/doc/type-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,27 @@ 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',

'AsyncIterable': 'https://tc39.github.io/ecma262/#sec-asynciterable-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 8c40ffc

Please sign in to comment.