diff --git a/package.json b/package.json index 408f02b2ade7fa..0bb6daaf460a3a 100644 --- a/package.json +++ b/package.json @@ -31,5 +31,8 @@ "_comment": "This will remove husky from when we started migrating to use prettier", "pre-commit": "npm uninstall husky" } + }, + "dependencies": { + "@types/node": "^13.7.0" } } diff --git a/types/json-file-plus/index.d.ts b/types/json-file-plus/index.d.ts index 8839ca72e85585..7b8b4035ef0def 100644 --- a/types/json-file-plus/index.d.ts +++ b/types/json-file-plus/index.d.ts @@ -3,13 +3,15 @@ // Definitions by: Daniel Byrne // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + declare function readJSON(filename: string): Promise; declare namespace readJSON { function sync(filename: string): JSONFile; interface Format { - readonly indent: number; + readonly indent: number | '\t'; readonly trailing: boolean; } @@ -17,9 +19,10 @@ declare namespace readJSON { format: Format; data: any; constructor(raw: string); - get: (key: string) => Promise; + get: (key: PropertyKey) => Promise; set: (data: any) => void; - remove: (key: string) => Promise; + remove: (key: PropertyKey) => Promise; + stringify: () => Buffer; } class JSONFile extends JSONData {