Skip to content

Commit

Permalink
fix: tsc out of memory
Browse files Browse the repository at this point in the history
  • Loading branch information
DTrombett committed May 19, 2023
1 parent c31b0c7 commit 283a91d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dist/
.argo/
.vscode/settings.json
_test.ts
types/
tsconfig.tsbuildinfo
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "./dist/index.js",
"types": "./src/index.ts",
"scripts": {
"build": "tsup && tsc --declaration --emitDeclarationOnly --declarationDir dist --noEmit false",
"build": "tsup && tsc --emitDeclarationOnly --declarationDir types --noEmit false",
"lint": "eslint src --fix",
"prettier": "prettier --write src/**/*.ts",
"start": "npm run build && node --trace-warnings --enable-source-maps .",
Expand Down
13 changes: 5 additions & 8 deletions src/types/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,11 @@ export type ClientOptions = Partial<
}
>;
export type Jsonify<T, D extends boolean = true> = D extends true
? Jsonify<
T extends {
toJSON(): infer J;
}
? J
: T,
false
>
? T extends {
toJSON(): infer J;
}
? Jsonify<J, false>
: Jsonify<T, false>
: T extends boolean | number | string | null
? T
: T extends bigint
Expand Down
2 changes: 1 addition & 1 deletion src/util/importData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AuthFolder } from "..";
export const importData = async <T extends keyof ReadData>(
name: T,
path = AuthFolder
): Promise<Jsonify<ReadData[T]> | undefined> =>
) =>
readFile(join(path, `${name}.json`), {
encoding: "utf8",
})
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"include": ["src/**/*"],
"include": ["src"],
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": false,
"alwaysStrict": true,
"composite": true,
"esModuleInterop": true,
"isolatedModules": true,
"module": "ESNext",
Expand All @@ -19,6 +20,7 @@
"outDir": "dist",
"pretty": true,
"resolveJsonModule": true,
"rootDir": "src",
"sourceMap": true
}
}

0 comments on commit 283a91d

Please sign in to comment.