-
-
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.
- Re-added globals.d.ts to JS template - Fixed globals.d.ts TSDoc notation and added vite/client type references - Upped tsconfig target to es2018 - Enable checkJs in tsconfig
- Loading branch information
Showing
7 changed files
with
39 additions
and
60 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 @@ | ||
--- | ||
'create-svelte': patch | ||
--- | ||
|
||
create-svelte: globals.d.ts TSDoc fixes, add vite/client types to js/tsconfig |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/// <reference types="@sveltejs/kit" /> | ||
/// <reference types="vite/client" /> | ||
|
||
//#region Ensure Svelte file endings have a type for TypeScript | ||
/** | ||
* These declarations tell TypeScript that we allow import of Svelte files in TS files, e.g. | ||
* ```js | ||
* import Component from './Component.svelte'; | ||
* ``` | ||
*/ | ||
declare module '*.svelte' { | ||
export { SvelteComponent as default } from 'svelte'; | ||
} | ||
//#endregion | ||
|
||
//#region Ensure image file endings have a type for TypeScript | ||
/** | ||
* Tell TypeScript that we allow import of images, e.g. | ||
* ```html | ||
* <script lang='ts'> | ||
* import successkid from 'images/successkid.jpg'; | ||
* </script> | ||
* <img src="{successkid}"> | ||
* ``` | ||
*/ | ||
declare module '*.(gif|jpg|jpeg|png|svg|webp)' { | ||
const value: string; | ||
export = value; | ||
} | ||
//#endregion |
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 was deleted.
Oops, something went wrong.
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