mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
317 B
TypeScript
13 lines
317 B
TypeScript
//// [tests/cases/compiler/contextualTyping15.ts] ////
|
|
|
|
//// [contextualTyping15.ts]
|
|
class foo { public bar: { (): number; (i: number): number; } = function() { return 1 }; }
|
|
|
|
//// [contextualTyping15.js]
|
|
"use strict";
|
|
class foo {
|
|
constructor() {
|
|
this.bar = function () { return 1; };
|
|
}
|
|
}
|