File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
packages/kit/src/core/sync Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,13 @@ import { write_non_ambient } from './write_non_ambient.js';
99import { 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 */
1616export function init ( config , mode ) {
1717 write_tsconfig ( config . kit ) ;
1818 write_ambient ( config . kit , mode ) ;
19- write_non_ambient ( config . kit ) ;
2019}
2120
2221/**
Original file line number Diff line number Diff 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 */
113113export 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}
You can’t perform that action at this time.
0 commit comments