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

vue-component-type-helpers

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-component-type-helpers - npm Package Compare versions

Comparing version 1.7.12 to 1.7.13

21

index.d.ts

@@ -5,4 +5,9 @@ declare const text: string;

export type ComponentType<T> =
T extends new () => {} ? 1 :
T extends (...args: any) => any ? 2 :
0;
export type ComponentProps<T> =
T extends new () => { $props: infer P } ? NonNullable<P> :
T extends new () => { $props: infer P; } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :

@@ -12,9 +17,9 @@ {};

export type ComponentSlots<T> =
T extends new () => { $slots: infer S } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S }, ...args: any) => any ? NonNullable<S> :
T extends new () => { $slots: infer S; } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? NonNullable<S> :
{};
export type ComponentEmit<T> =
T extends new () => { $emit: infer E } ? NonNullable<E> :
T extends (props: any, ctx: { emit: infer E }, ...args: any) => any ? NonNullable<E> :
T extends new () => { $emit: infer E; } ? NonNullable<E> :
T extends (props: any, ctx: { emit: infer E; }, ...args: any) => any ? NonNullable<E> :
{};

@@ -24,3 +29,3 @@

T extends new () => infer E ? E :
T extends (props: any, ctx: { expose(exposed: infer E): any }, ...args: any) => any ? NonNullable<E> :
T extends (props: any, ctx: { expose(exposed: infer E): any; }, ...args: any) => any ? NonNullable<E> :
{};

@@ -33,4 +38,4 @@

export type Vue2ComponentSlots<T> =
T extends new () => { $scopedSlots: infer S } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S }, ...args: any) => any ? NonNullable<S> :
T extends new () => { $scopedSlots: infer S; } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? NonNullable<S> :
{};
exports.default = `
type ComponentProps<T> =
T extends new () => { $props: infer P } ? NonNullable<P> :
export type ComponentType<T> =
T extends new () => {} ? 1 :
T extends (...args: any) => any ? 2 :
0;
export type ComponentProps<T> =
T extends new () => { $props: infer P; } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :
{};
type ComponentSlots<T> =
T extends new () => { $slots: infer S } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S }, ...args: any) => any ? NonNullable<S> :
export type ComponentSlots<T> =
T extends new () => { $slots: infer S; } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? NonNullable<S> :
{};
type ComponentEmit<T> =
T extends new () => { $emit: infer E } ? NonNullable<E> :
T extends (props: any, ctx: { emit: infer E }, ...args: any) => any ? NonNullable<E> :
export type ComponentEmit<T> =
T extends new () => { $emit: infer E; } ? NonNullable<E> :
T extends (props: any, ctx: { emit: infer E; }, ...args: any) => any ? NonNullable<E> :
{};
type ComponentExposed<T> =
export type ComponentExposed<T> =
T extends new () => infer E ? E :
T extends (props: any, ctx: { expose(exposed: infer E): any }, ...args: any) => any ? NonNullable<E> :
T extends (props: any, ctx: { expose(exposed: infer E): any; }, ...args: any) => any ? NonNullable<E> :
{};
/**
* Vue 2.x
*/
* Vue 2.x
*/
type Vue2ComponentSlots<T> =
T extends new () => { $scopedSlots: infer S } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S }, ...args: any) => any ? NonNullable<S> :
export type Vue2ComponentSlots<T> =
T extends new () => { $scopedSlots: infer S; } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? NonNullable<S> :
{};
`.trim();
{
"name": "vue-component-type-helpers",
"version": "1.7.12",
"version": "1.7.13",
"license": "MIT",

@@ -14,3 +14,3 @@ "files": [

},
"gitHead": "9e712c2d603c690cd03502f5ec1a99bd80b800ac"
"gitHead": "32d5d5e4414f97b0dc28cd727a9cecf60acd4e97"
}
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