24 lines
1 KiB
Text
24 lines
1 KiB
Text
=== tests/cases/compiler/moduleAliasAsFunctionArgument_1.ts ===
|
|
///<reference path='moduleAliasAsFunctionArgument_0.ts'/>
|
|
import a = require('moduleAliasAsFunctionArgument_0');
|
|
>a : Symbol(a, Decl(moduleAliasAsFunctionArgument_1.ts, 0, 0))
|
|
|
|
function fn(arg: { x: number }) {
|
|
>fn : Symbol(fn, Decl(moduleAliasAsFunctionArgument_1.ts, 1, 54))
|
|
>arg : Symbol(arg, Decl(moduleAliasAsFunctionArgument_1.ts, 3, 12))
|
|
>x : Symbol(x, Decl(moduleAliasAsFunctionArgument_1.ts, 3, 18))
|
|
}
|
|
|
|
a.x; // OK
|
|
>a.x : Symbol(a.x, Decl(moduleAliasAsFunctionArgument_0.ts, 0, 10))
|
|
>a : Symbol(a, Decl(moduleAliasAsFunctionArgument_1.ts, 0, 0))
|
|
>x : Symbol(a.x, Decl(moduleAliasAsFunctionArgument_0.ts, 0, 10))
|
|
|
|
fn(a); // Error: property 'x' is missing from 'a'
|
|
>fn : Symbol(fn, Decl(moduleAliasAsFunctionArgument_1.ts, 1, 54))
|
|
>a : Symbol(a, Decl(moduleAliasAsFunctionArgument_1.ts, 0, 0))
|
|
|
|
=== tests/cases/compiler/moduleAliasAsFunctionArgument_0.ts ===
|
|
export var x: number;
|
|
>x : Symbol(x, Decl(moduleAliasAsFunctionArgument_0.ts, 0, 10))
|
|
|