8 lines
160 B
JavaScript
8 lines
160 B
JavaScript
![]() |
declare class Foo {
|
||
|
bar(x: 'hmm'): number;
|
||
|
bar(x: string): string;
|
||
|
}
|
||
|
var foo = new Foo;
|
||
|
(foo.bar('hmm'): number); // OK
|
||
|
(foo.bar('hmmm'): number); // error
|