vue-component-type-helpers
Advanced tools
Comparing version 2.0.14 to 2.0.15
@@ -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> : | ||
{}; |
12
index.js
@@ -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" | ||
} |
16
vue2.js
@@ -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 |
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
4727
7
60