diff --git a/types/app-root-dir/app-root-dir-tests.ts b/types/app-root-dir/app-root-dir-tests.ts index eecfc42d03..bff8969927 100644 --- a/types/app-root-dir/app-root-dir-tests.ts +++ b/types/app-root-dir/app-root-dir-tests.ts @@ -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(); diff --git a/types/app-root-dir/index.d.ts b/types/app-root-dir/index.d.ts index 9c7fb51cbc..8b0bf5bc6a 100644 --- a/types/app-root-dir/index.d.ts +++ b/types/app-root-dir/index.d.ts @@ -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 // 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; diff --git a/types/app-root-dir/tsconfig.json b/types/app-root-dir/tsconfig.json index c3a03ef0b7..9fc4a91fff 100644 --- a/types/app-root-dir/tsconfig.json +++ b/types/app-root-dir/tsconfig.json @@ -12,7 +12,7 @@ "typeRoots": [ "../" ], - "types": ["node"], + "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true },