swc/crates/swc_ecma_parser/tests/tsc/jsDeclarationsFunctionJSDoc.ts

41 lines
647 B
TypeScript
Raw Normal View History

// @allowJs: true
// @checkJs: true
// @target: es5
// @outDir: ./out
// @declaration: true
// @filename: source.js
/**
* Foos a bar together using an `a` and a `b`
* @param {number} a
* @param {string} b
*/
export function foo(a, b) {}
/**
* Legacy - DO NOT USE
*/
export class Aleph {
/**
* Impossible to construct.
* @param {Aleph} a
* @param {null} b
*/
constructor(a, b) {
/**
* Field is always null
*/
this.field = b;
}
/**
* Doesn't actually do anything
* @returns {void}
*/
doIt() {}
}
/**
* Not the speed of light
*/
export const c = 12;