fix: 1.add semicolon 2. tsconfig.types set to [] 3. Correct the index.d.ts header format

This commit is contained in:
chenyang
2018-02-17 20:28:04 +08:00
parent 08d820c93b
commit 78a202e81d
3 changed files with 11 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
import * as rootDir from 'app-root-dir'
import * as rootDir from 'app-root-dir';
let appRootPath: string
rootDir.set(__dirname)
appRootPath = rootDir.get()
let appRootPath: string;
rootDir.set('__dirname');
appRootPath = rootDir.get();

View File

@@ -1,21 +1,20 @@
import { interfaceExtends } from '../babel-types/index.d'
// Type definitions for [ app-root-dir ] [ 1.0.2 ]
// Project : [ https://github.com/philidem/node-app-root-dir ]
// Type definitions for app-root-dir 0.1
// Project: https://github.com/philidem/node-app-root-dir
// Definitions by: shaochenyang <https://github.com/chenyang-biu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface AppRootDir {
// Get the application's root directory
get(): string
get(): string;
/**
* Set the application's root directory
* this will set a global so that no matter
* how many instances of app-root-dir module are installed,
* they will all return the same directory
*/
set(dirname: string): void
set(dirname: string): void;
}
declare const AppRootDir: AppRootDir
declare const AppRootDir: AppRootDir;
export = AppRootDir
export = AppRootDir;

View File

@@ -12,7 +12,7 @@
"typeRoots": [
"../"
],
"types": ["node"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},