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