Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte2tsx

Package Overview
Dependencies
Maintainers
3
Versions
296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte2tsx - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

27

index.d.ts

@@ -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>;

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc