Skip to content

Commit f1463aa

Browse files
mrkldshvbenmccann
andauthored
[feat] extract and export types from create-svelte (#7111)
* [feat] extract and export type for create function * remove blank line Co-authored-by: Ben McCann <[email protected]> Co-authored-by: Ben McCann <[email protected]>
1 parent 31e8818 commit f1463aa

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Diff for: .changeset/many-planes-taste.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-svelte': patch
3+
---
4+
5+
[feat] extract and export types from create-svelte

Diff for: packages/create-svelte/index.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import fs from 'fs';
22
import path from 'path';
33
import { mkdirp, copy, dist } from './utils.js';
44

5-
/**
6-
* Create a new SvelteKit project.
7-
*
8-
* @param {string} cwd - Path to the directory to create
9-
* @param {import('./types/internal').Options} options
10-
*/
5+
/** @type {import('./types/index').create} */
116
export async function create(cwd, options) {
127
mkdirp(cwd);
138

Diff for: packages/create-svelte/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
"index.js",
4343
"dist",
4444
"bin.js",
45-
"utils.js"
45+
"utils.js",
46+
"types"
4647
],
48+
"types": "types/index.d.ts",
4749
"type": "module"
4850
}

Diff for: packages/create-svelte/types/index.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Options } from './internal';
2+
3+
/**
4+
* Create a new SvelteKit project.
5+
* @param {string} cwd - Path to the directory to create
6+
* @param {import('./internal').Options} options
7+
*/
8+
export function create(cwd: string, options: Options): Promise<void>;

0 commit comments

Comments
 (0)