perf: add truthProp util (#8522)

* perf: add TruthyProp util

* chore: rename

* chore: upd
This commit is contained in:
neverland
2021-04-14 10:26:21 +08:00
committed by GitHub
parent 9381640d2e
commit bd609e1df0
59 changed files with 226 additions and 460 deletions
+6 -2
View File
@@ -6,8 +6,12 @@ export const extend = Object.assign;
export const inBrowser = typeof window !== 'undefined';
// unknown type for Vue prop
export const UnknownProp = (null as unknown) as PropType<unknown>;
// PropTypes
export const unknownProp = (null as unknown) as PropType<unknown>;
export const truthProp = {
type: Boolean,
default: true as const,
};
// eslint-disable-next-line
export type ComponentInstance = ComponentPublicInstance<{}, any>;