@@ -3,11 +3,24 @@ export interface SvelteCompiledToTsx {
3
3
map : import ( "magic-string" ) . SourceMap ;
4
4
exportedNames : IExportedNames ;
5
5
events : ComponentEvents ;
6
+ componentDocumentation : string ;
7
+ slots : Map < string , Map < string , string > > ;
8
+ generics : {
9
+ definitions : string ;
10
+ references : string ;
11
+ } ;
6
12
}
7
13
8
- export interface IExportedNames {
9
- has ( name : string ) : boolean ;
10
- }
14
+ export type IExportedNames = Map <
15
+ string ,
16
+ {
17
+ isLet : boolean ;
18
+ type ?: string ;
19
+ identifierText ?: string ;
20
+ required ?: boolean ;
21
+ doc ?: string ;
22
+ }
23
+ > ;
11
24
12
25
export interface ComponentEvents {
13
26
getAll ( ) : { name : string ; type : string ; doc ?: string } [ ] ;
@@ -51,16 +64,16 @@ export function svelte2tsx(
51
64
/**
52
65
* Takes effect when using the new 'ts' mode. Default 'svelteHTML'.
53
66
* Tells svelte2tsx from which namespace some specific functions to use.
54
- *
67
+ *
55
68
* Example: 'svelteHTML' -> svelteHTML.createElement<..>(..)
56
- *
69
+ *
57
70
* A namespace needs to implement the following functions:
58
71
* - `createElement(str: string, validAttributes: ..): Element`
59
72
* - `mapElementTag<Key extends keyof YourElements>(str: Key): YourElements[Key]`
60
73
*/
61
74
typingsNamespace ?: string ;
62
75
/**
63
- * The accessor option from svelte config.
76
+ * The accessor option from svelte config.
64
77
* Would be overridden by the same config in the svelte:option element if exist
65
78
* see https://svelte.dev/docs#svelte_compile for more info
66
79
*/
0 commit comments