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 2.0.14 to 2.0.15

vue2.d.ts

40

index.d.ts

@@ -0,27 +1,17 @@

export type ComponentType<T> = T extends new (...angs: any) => {} ? 1 : T extends (...args: any) => any ? 2 : 0;
export type ComponentProps<T> = T extends new (...angs: any) => {
$props: infer P;
} ? NonNullable<P> : T extends (props: infer P, ...args: any) => any ? P : {};
export type ComponentSlots<T> = T extends new (...angs: any) => {
$slots: infer S;
} ? NonNullable<S> : T extends (props: any, ctx: {
slots: infer S;
attrs: any;
emit: any;
}, ...args: any) => any ? NonNullable<S> : {};
export type ComponentEmit<T> = T extends new (...angs: any) => {
$emit: infer E;
} ? NonNullable<E> : {};
export type ComponentExposed<T> = T extends new (...angs: any) => infer E ? E : T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable<E> : {};
export declare const code: string;
export default code;
export type ComponentType<T> =
T extends new (...angs: any) => {} ? 1 :
T extends (...args: any) => any ? 2 :
0;
export type ComponentProps<T> =
T extends new (...angs: any) => { $props: infer P; } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :
{};
export type ComponentSlots<T> =
T extends new (...angs: any) => { $slots: infer S; } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any; }, ...args: any) => any ? NonNullable<S> :
{};
export type ComponentEmit<T> =
T extends new (...angs: any) => { $emit: infer E; } ? NonNullable<E> :
{};
export type ComponentExposed<T> =
T extends new (...angs: any) => infer E ? E :
T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable<E> :
{};

@@ -1,4 +0,5 @@

// @ts-check
const code = `
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.code = void 0;
exports.code = `
export type ComponentType<T> =

@@ -29,4 +30,3 @@ T extends new (...angs: any) => {} ? 1 :

`.trim();
exports.code = code;
exports.default = code;
exports.default = exports.code;
//# sourceMappingURL=index.js.map
{
"name": "vue-component-type-helpers",
"version": "2.0.14",
"version": "2.0.15",
"license": "MIT",

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

},
"gitHead": "ce1412067f88b7f9af03a2d3e04c220b4921c363"
"gitHead": "095f44449d71cd5a4730306c9c8c40df4d44dce3"
}

@@ -1,8 +0,8 @@

// @ts-check
const code = require('./index')
.code
.replace('$slots', '$scopedSlots');
exports.code = code;
exports.default = code;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.code = void 0;
var index_1 = require("./index");
const index_2 = require("./index");
exports.code = index_2.code.replace('$slots', '$scopedSlots');
exports.default = exports.code;
//# sourceMappingURL=vue2.js.map
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