Closed kungfooman closed 2 weeks ago
Example:
/** * @param {PretrainedOptions} [something] Optional parameters. */ export async function test( { revision = 'main', } = {} ) { return revision; } const ret = test(); console.log('ret', ret);
Transpiled code:
/** * @param {PretrainedOptions} [something] Optional parameters. */ function test({ revision = 'main', } = {}) { if (!inspectType(something, { "type": "PretrainedOptions", "optional": true }, 'test', 'something')) { youCanAddABreakpointHere(); } return revision; } const ret = test(); console.log('ret', ret);
Current error:
Uncaught ReferenceError: something is not defined at test (<anonymous>:10:20) at <anonymous>:18:13
Example:
Transpiled code:
Current error: