-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package
not generating .d.ts
files for all components in new repo
#3783
Comments
This evening I took a quick look into this. All the files are being passed into I think it might be related to $$Generic, though without a root cause I'm not entirely sure. The three files that did not have emitted types all had $$Generic, and when I changed one of the types away from $$Generic in one of those components, its definition file was now emitted correctly. |
I remember svelte2tsx's |
Ahhhhhhh... I figured it out! At least, partially. There's an issue because these components use the If I add a and here in kit: kit/packages/kit/src/packaging/index.js Line 316 in 49c7870
then we do get .d.ts files for Making this change also fixes the issue I reported at the bottom of this comment: sveltejs/language-tools#442 (comment) which is blocking me from shipping a big improvement to the TypeScript support for Does this sound like a reasonable fix? Maybe the cc @dummdidumm edit: I think, separately from this particular fix, there should still be some error message if emitDts does not successfully emit a dts file. |
I have noticed the following: All the following works: type T = $$Generic;
type U = $$Generic<string>;
import type { TypeArbitrary } from './types.ts';
type V = $$Generic<TypeArbitrary >; This does not work: type TypeArbitrary = string;
type U = $$Generic<TypeArbitrary >; It is as if defining a type used in a component as an extension of a generic type was not working. |
Closing this as it is no longer reproducible |
Describe the bug
I set up a small test repo with Kit just now to demonstrate some other issue. All I did was create the repo with
npm init svelte@next
,npm install
,npm install -D svelte2tsx typescript
, create a few component files insrc/lib
, and create asrc/lib/index.ts
file.For some reason when I run
npm run package
the component filesComponent.svelte
,ComponentTwo.svelte
, andComponentThree.svelte
don't have any.d.ts
files generated in thepackage
directory. OnlyBase.svelte.d.ts
is generated. There are no errors or any other indications that something is wrong.Reproduction
https://github.com/rgossiaux/svelte-typing-tests
npm install
andnpm run package
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: