-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: assert types for Svelte 3, 4, 5
- Loading branch information
Showing
16 changed files
with
174 additions
and
1 deletion.
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
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,35 @@ | ||
<script lang="ts"> | ||
import { | ||
Add, | ||
Assembly, | ||
Beta, | ||
BookmarkAdd, | ||
BreakingChange, | ||
LogoSvelte, | ||
Plan, | ||
ZSystems, | ||
BatchJob, | ||
} from "carbon-icons-svelte"; | ||
import type { CarbonIconProps } from "carbon-icons-svelte"; | ||
import Icon from "carbon-icons-svelte/lib/Accessibility.svelte"; | ||
const props: CarbonIconProps = { | ||
size: 32, | ||
fill: "red", | ||
}; | ||
const icon = new Icon({ target: document.body, props }); | ||
$: console.log(icon.$$prop_def); | ||
$: console.log(typeof Assembly); | ||
</script> | ||
|
||
<Add size={20} fill="red" title="title" data-test="id" /> | ||
<Icon style={null} /> | ||
<BookmarkAdd /> | ||
<BreakingChange /> | ||
<LogoSvelte /> | ||
<Plan /> | ||
<ZSystems /> | ||
<BatchJob /> | ||
<svelte:component this={Beta} /> |
Binary file not shown.
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,15 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"test:types": "svelte-check" | ||
}, | ||
"dependencies": { | ||
"carbon-icons-svelte": "link:carbon-icons-svelte" | ||
}, | ||
"devDependencies": { | ||
"svelte": "^3.59.2", | ||
"svelte-check": "^3.8.6", | ||
"typescript": "^5.7.2" | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"verbatimModuleSyntax": true, | ||
"isolatedModules": true, | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
} | ||
} |
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,35 @@ | ||
<script lang="ts"> | ||
import { | ||
Add, | ||
Assembly, | ||
Beta, | ||
BookmarkAdd, | ||
BreakingChange, | ||
LogoSvelte, | ||
Plan, | ||
ZSystems, | ||
BatchJob, | ||
} from "carbon-icons-svelte"; | ||
import type { CarbonIconProps } from "carbon-icons-svelte"; | ||
import Icon from "carbon-icons-svelte/lib/Accessibility.svelte"; | ||
const props: CarbonIconProps = { | ||
size: 32, | ||
fill: "red", | ||
}; | ||
const icon = new Icon({ target: document.body, props }); | ||
$: console.log(icon.$$prop_def); | ||
$: console.log(typeof Assembly); | ||
</script> | ||
|
||
<Add size={20} fill="red" title="title" data-test="id" /> | ||
<Icon style={null} /> | ||
<BookmarkAdd /> | ||
<BreakingChange /> | ||
<LogoSvelte /> | ||
<Plan /> | ||
<ZSystems /> | ||
<BatchJob /> | ||
<svelte:component this={Beta} /> |
Binary file not shown.
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,15 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"test:types": "svelte-check" | ||
}, | ||
"dependencies": { | ||
"carbon-icons-svelte": "link:carbon-icons-svelte" | ||
}, | ||
"devDependencies": { | ||
"svelte": "^4.2.19", | ||
"svelte-check": "^4.1.1", | ||
"typescript": "^5.7.2" | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"verbatimModuleSyntax": true, | ||
"isolatedModules": true, | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
} | ||
} |
File renamed without changes.
Binary file not shown.
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,15 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"test:types": "svelte-check" | ||
}, | ||
"dependencies": { | ||
"carbon-icons-svelte": "link:carbon-icons-svelte" | ||
}, | ||
"devDependencies": { | ||
"svelte": "^5.16.0", | ||
"svelte-check": "^4.1.1", | ||
"typescript": "^5.7.2" | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"verbatimModuleSyntax": true, | ||
"isolatedModules": true, | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
} | ||
} |
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,8 @@ | ||
import { $ } from "bun"; | ||
|
||
for await (const dir of $`find tests -maxdepth 1 -mindepth 1 -type d`.lines()) { | ||
if (dir && /svelte/.test(dir)) { | ||
await $`cd ${dir} && bun install`; | ||
await $`cd ${dir} && bun run test:types`; | ||
} | ||
} |
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