Skip to content

Commit 363e231

Browse files
committed
tweak
1 parent 65511d1 commit 363e231

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/kit/src/core/sync/sync.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ import { write_non_ambient } from './write_non_ambient.js';
99
import { write_server } from './write_server.js';
1010

1111
/**
12-
* Initialize SvelteKit's generated files.
12+
* Initialize SvelteKit's generated files that only depend on the config and mode.
1313
* @param {import('types').ValidatedConfig} config
1414
* @param {string} mode
1515
*/
1616
export function init(config, mode) {
1717
write_tsconfig(config.kit);
1818
write_ambient(config.kit, mode);
19-
write_non_ambient(config.kit);
2019
}
2120

2221
/**

packages/kit/src/core/sync/write_non_ambient.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,11 @@ function generate_app_types(manifest_data) {
108108
/**
109109
* Writes non-ambient declarations to the output directory
110110
* @param {import('types').ValidatedKitConfig} config
111-
* @param {import('types').ManifestData} [manifest_data]
111+
* @param {import('types').ManifestData} manifest_data
112112
*/
113113
export function write_non_ambient(config, manifest_data) {
114-
let content = template;
115-
116-
if (manifest_data) {
117-
const app_types = generate_app_types(manifest_data);
118-
content = [template, app_types].join('\n\n');
119-
}
114+
const app_types = generate_app_types(manifest_data);
115+
const content = [template, app_types].join('\n\n');
120116

121117
write_if_changed(path.join(config.outDir, 'non-ambient.d.ts'), content);
122118
}

0 commit comments

Comments
 (0)