svelte2tsx
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -50,1 +50,28 @@ export interface SvelteCompiledToTsx { | ||
): SvelteCompiledToTsx | ||
export interface EmitDtsConig { | ||
/** | ||
* Where to output the declaration files | ||
*/ | ||
declarationDir: string; | ||
/** | ||
* Path to `svelte-shims.d.ts` of `svelte2tsx`. | ||
* Example: `require.resolve('svelte2tsx/svelte-shims.d.ts')` | ||
*/ | ||
svelteShimsPath: string; | ||
/** | ||
* If you want to emit types only for part of your project, | ||
* then set this to the folder for which the types should be emitted. | ||
* Most of the time you don't need this. For SvelteKit, this is for example | ||
* set to `src/lib` by default. | ||
*/ | ||
libRoot?: string; | ||
} | ||
/** | ||
* Searches for a jsconfig or tsconfig starting at `root` and emits d.ts files | ||
* into `declarationDir` using the ambient file from `svelteShimsPath`. | ||
* Note: Handwritten `d.ts` files are not copied over; TypeScript does not | ||
* touch these files. | ||
*/ | ||
export function emitDts(config: EmitDtsConig): Promise<void>; |
{ | ||
"name": "svelte2tsx", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Convert Svelte components to TSX for type checking", | ||
@@ -5,0 +5,0 @@ "author": "David Pershouse", |
@@ -102,2 +102,3 @@ // Whenever a ambient declaration changes, its number should be increased | ||
type SveltePropsAnyFallback<Props> = {[K in keyof Props]: Props[K] extends undefined ? any : Props[K]} | ||
type SvelteSlotsAnyFallback<Slots> = {[K in keyof Slots]: {[S in keyof Slots[K]]: Slots[K][S] extends undefined ? any : Slots[K][S]}} | ||
type SvelteRestProps = { [index: string]: any } | ||
@@ -138,15 +139,15 @@ type SvelteSlots = { [index: string]: any } | ||
render: {props: Props, events: Events, slots: Slots } | ||
): {props: Expand<SveltePropsAnyFallback<Props>>, events: Events, slots: Slots } | ||
): {props: Expand<SveltePropsAnyFallback<Props>>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>> } | ||
declare function __sveltets_1_partial<Props = {}, Events = {}, Slots = {}, OptionalProps extends keyof Props = any>( | ||
optionalProps: OptionalProps[], | ||
render: {props: Props, events: Events, slots: Slots } | ||
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps>>, events: Events, slots: Slots } | ||
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps>>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>> } | ||
declare function __sveltets_1_partial_with_any<Props = {}, Events = {}, Slots = {}>( | ||
render: {props: Props, events: Events, slots: Slots } | ||
): {props: Expand<SveltePropsAnyFallback<Props> & SvelteAllProps>, events: Events, slots: Slots } | ||
): {props: Expand<SveltePropsAnyFallback<Props> & SvelteAllProps>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>> } | ||
declare function __sveltets_1_partial_with_any<Props = {}, Events = {}, Slots = {}, OptionalProps extends keyof Props = any>( | ||
optionalProps: OptionalProps[], | ||
render: {props: Props, events: Events, slots: Slots } | ||
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps> & SvelteAllProps>, events: Events, slots: Slots } | ||
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps> & SvelteAllProps>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>> } | ||
@@ -153,0 +154,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
482550
11858