Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// excerpt from vue-class-component/src/declarations.ts
type VueClass = { new(...args: any[]): V & Vue } & typeof Vue
// excerpt from vue-class-component/src/index.ts
function Component(options: ComponentOptions | VueClass): any {
return null; // mocked
}
const mustBeCool: CustomRule = (value: string) => value.indexOf('cool') >= 0
const mustBeCool2: CustomRule = (value: string) => !helpers.req(value) || value.indexOf('cool') >= 0
const contains = (param: string): CustomRule =>
(value: string) => !helpers.req(value) || value.indexOf(param) >= 0
const mustBeCool3 = helpers.withParams(
{ type: 'mustBeCool3' },
(value: any) => !helpers.req(value) || value.indexOf('cool') >= 0
)
const mustBeCool3Result: boolean = mustBeCool3(50)
const mustBeCool4 = helpers.regex('mustBeCool4', /^.*cool.*$/)
const mustBeSame = (reference: string) => helpers.withParams(
{ type: 'mustBeSame' },
(value: any, parentVm?: Vue) =>
value === helpers.ref(reference, self, parentVm)
)
const mustHaveLength = (minLen: number) => helpers.withParams(
{ type: 'mustHaveLength' },
const mustBeSame = (reference: string) => helpers.withParams(
{ type: 'mustBeSame' },
(value: any, parentVm?: Vue) =>
value === helpers.ref(reference, self, parentVm)
)