Skip to content

Commit 685e733

Browse files
Fix CLI typescript errors (#769)
* Update cli tempalte to fix ts errors * Commit forgotten save * Update indentation * ES2015 to ESNext, add strict * Simplify Response
1 parent b597aac commit 685e733

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/cli/src/init.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export async function extendPackageJson(dirPath: string, projectName: string): P
153153
devDependencies: {
154154
[packageJSON.name]: `^${packageJSON.version}`,
155155
'@gitbook/tsconfig': '*',
156+
'@cloudflare/workers-types': '*',
156157
},
157158
};
158159

@@ -246,7 +247,13 @@ export function generateScript(project: { name: string }): string {
246247
export function generateTSConfig(): string {
247248
return detent(`
248249
{
249-
"extends": "@gitbook/tsconfig/integration.json"
250+
"extends": "@gitbook/tsconfig/integration.json",
251+
"compilerOptions": {
252+
"lib": ["ESNext", "DOM"],
253+
"moduleResolution": "bundler",
254+
"module": "ESNext",
255+
"strict": true
256+
}
250257
}
251258
`).trim();
252259
}

0 commit comments

Comments
 (0)