https://github.com/rgossiaux/svelte-prop-spread-ts
https://github.com/rgossiaux/svelte-prop-spread-ts
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rgossiaux/svelte-prop-spread-ts
- Owner: rgossiaux
- Created: 2022-02-01T02:01:59.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-01T02:37:43.000Z (about 3 years ago)
- Last Synced: 2025-04-09T15:13:09.137Z (14 days ago)
- Language: JavaScript
- Size: 59.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
* Clone the repo
* `npm install`
* `npm run check`## Expected
TypeScript errors:
* This component passes a function to ``'s `name` prop, and also passes an `animal` prop https://github.com/rgossiaux/svelte-prop-spread-ts/blob/cbd721a3072aeaf5552178890c39de514200687e/src/routes/index.svelte#L9
* `` spreads its props to ``: https://github.com/rgossiaux/svelte-prop-spread-ts/blob/057a71cfad1c3fb5024412076a20234780d4802d/src/lib/Parent.svelte#L5
* `` expects a `string` for `name`, and does not have an `animal` prop: https://github.com/rgossiaux/svelte-prop-spread-ts/blob/057a71cfad1c3fb5024412076a20234780d4802d/src/lib/Child.svelte#L2Both the wrongly-typed `name` and the extra prop `animal` should throw type errors.
## Actual
No errors