TypeScript/tests/baselines/reference/functionCall12.types

43 lines
883 B
Text
Raw Normal View History

=== tests/cases/compiler/functionCall12.ts ===
function foo(a:string, b?:number, c?:string){}
>foo : (a: string, b?: number, c?: string) => void
>a : string
>b : number
>c : string
foo('foo', 1);
>foo('foo', 1) : void
>foo : (a: string, b?: number, c?: string) => void
>'foo' : "foo"
>1 : 1
foo('foo');
>foo('foo') : void
>foo : (a: string, b?: number, c?: string) => void
>'foo' : "foo"
foo();
>foo() : void
>foo : (a: string, b?: number, c?: string) => void
foo(1, 'bar');
>foo(1, 'bar') : void
>foo : (a: string, b?: number, c?: string) => void
>1 : 1
>'bar' : "bar"
foo('foo', 1, 'bar');
>foo('foo', 1, 'bar') : void
>foo : (a: string, b?: number, c?: string) => void
>'foo' : "foo"
>1 : 1
>'bar' : "bar"
foo('foo', 1, 3);
>foo('foo', 1, 3) : void
>foo : (a: string, b?: number, c?: string) => void
>'foo' : "foo"
>1 : 1
>3 : 3