mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
460 B
TypeScript
34 lines
460 B
TypeScript
//// [tests/cases/compiler/argumentsReferenceInConstructor1_Js.ts] ////
|
|
|
|
//// [a.js]
|
|
class A {
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param {object} [foo={}]
|
|
*/
|
|
constructor(foo = {}) {
|
|
/**
|
|
* @type object
|
|
*/
|
|
this.arguments = foo;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
//// [a.d.ts]
|
|
declare class A {
|
|
/**
|
|
* @type object
|
|
*/
|
|
arguments: object;
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param {object} [foo={}]
|
|
*/
|
|
constructor(foo?: object);
|
|
}
|