91 lines
No EOL
3 KiB
Text
91 lines
No EOL
3 KiB
Text
==== tests/cases/compiler/noImplicitAnyParametersInAmbientModule.ts (22 errors) ====
|
|
|
|
declare module D_M {
|
|
// No implicit-'any' errors.
|
|
function dm_f1(): void;
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f2(x): void;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f3(x: any): void;
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f4(x, y, z): void;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'y' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'z' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f5(x, y: any, z): void;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'z' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f6(...r): void;
|
|
~~~~
|
|
!!! Rest parameter 'r' implicitly has an 'any[]' type.
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f7(x, ...r): void;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~~~~
|
|
!!! Rest parameter 'r' implicitly has an 'any[]' type.
|
|
|
|
// No implicit-'any' errors.
|
|
function dm_f8(x1, y1: number): any;
|
|
~~
|
|
!!! Parameter 'x1' implicitly has an 'any' type.
|
|
function dm_f8(x2: string, y2): any;
|
|
~~
|
|
!!! Parameter 'y2' implicitly has an 'any' type.
|
|
function dm_f8(x3, y3): any;
|
|
~~
|
|
!!! Parameter 'x3' implicitly has an 'any' type.
|
|
~~
|
|
!!! Parameter 'y3' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f9: () => string;
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f10: (x) => string;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f11: (x, y, z) => string;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'y' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'z' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f12: (x, y: any, z) => string;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~
|
|
!!! Parameter 'z' implicitly has an 'any' type.
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f13: (...r) => string;
|
|
~~~~
|
|
!!! Rest parameter 'r' implicitly has an 'any[]' type.
|
|
|
|
// No implicit-'any' errors.
|
|
var dm_f14: (x, ...r) => string;
|
|
~
|
|
!!! Parameter 'x' implicitly has an 'any' type.
|
|
~~~~
|
|
!!! Rest parameter 'r' implicitly has an 'any[]' type.
|
|
} |