-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add config.kit.package.emitTypes option (#1852)
Closes #1851
- Loading branch information
Showing
23 changed files
with
109 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
add config.kit.package.emitTypes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/expected/Test.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
6 changes: 6 additions & 0 deletions
6
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/expected/Test2.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script> | ||
/** | ||
* @type {import('./foo').Foo} | ||
*/ | ||
export let foo; | ||
</script> |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/expected/foo.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type Foo = boolean; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/expected/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Test } from './Test.svelte'; |
13 changes: 13 additions & 0 deletions
13
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/expected/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "javascript-no-types", | ||
"version": "1.0.0", | ||
"description": "package-javascript-no-types-test", | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
"./index.js": "./index.js", | ||
"./Test.svelte": "./Test.svelte", | ||
"./Test2.svelte": "./Test2.svelte", | ||
".": "./index.js" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "javascript-no-types", | ||
"version": "1.0.0", | ||
"description": "package-javascript-no-types-test" | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/src/app.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%svelte.head% | ||
</head> | ||
<body> | ||
<div id="svelte">%svelte.body%</div> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/src/lib/Test.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script> | ||
import { createEventDispatcher } from 'svelte'; | ||
/** | ||
* @type {string} | ||
*/ | ||
export const astring; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
</script> | ||
|
||
<slot {astring} /> |
6 changes: 6 additions & 0 deletions
6
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/src/lib/Test2.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script> | ||
/** | ||
* @type {import('./foo').Foo} | ||
*/ | ||
export let foo; | ||
</script> |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/src/lib/foo.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type Foo = boolean; |
1 change: 1 addition & 0 deletions
1
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/src/lib/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Test } from './Test.svelte'; |
7 changes: 7 additions & 0 deletions
7
packages/kit/src/core/make_package/test/fixtures/javascript_no_types/svelte.config.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
kit: { | ||
package: { | ||
emitTypes: false | ||
} | ||
} | ||
}; |
4 changes: 2 additions & 2 deletions
4
packages/kit/src/core/make_package/test/fixtures/typescript/expected/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/kit/src/core/make_package/test/fixtures/typescript/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "javascript", | ||
"name": "typescript", | ||
"version": "1.0.0", | ||
"description": "package-javascript-test" | ||
"description": "package-typescript-test" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters