1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
/index.ts(4,5): error TS2339: Property 'y' does not exist on type 'typeof import("shortid")'.
==== /tsconfig.json (0 errors) ====
{
"compileOnSave": true,
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"outDir": "bin"
},
"exclude": [ "node_modules" ]
}
==== /index.ts (1 errors) ====
/// <reference path="/typings/index.d.ts" />
import * as foo from "shortid";
foo.x // found in index.d.ts
foo.y // ignored from shortid/index.js
~
!!! error TS2339: Property 'y' does not exist on type 'typeof import("shortid")'.
==== /node_modules/shortid/node_modules/z/index.js (0 errors) ====
// z will not be found because maxNodeModulesJsDepth: 0
module.exports = { z: 'no' };
==== /node_modules/shortid/index.js (0 errors) ====
var z = require('z');
var y = { y: 'foo' };
module.exports = y;
==== /typings/index.d.ts (0 errors) ====
declare module "shortid" {
export var x: number;
}
|