id int64 0 1.29M | original_id stringlengths 32 32 | swhid stringlengths 100 170 | sha1 stringlengths 40 40 | repo_name stringlengths 2 45 | repo_group stringclasses 12
values | filepath stringlengths 5 153 | name stringlengths 1 14.9k | type stringclasses 3
values | code stringlengths 7 2.12M |
|---|---|---|---|---|---|---|---|---|---|
1,286,600 | 7f4a3200555cffc7a7bc25b4a3837cb0 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=200-200/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | FormatValidator | type | type FormatValidator<T extends string | number> = (data: T) => boolean |
1,286,601 | 90ee2607299a0c595f35c82f6b569d88 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=220-227/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | AddedFormat | type | type AddedFormat =
| true
| RegExp
| FormatValidator<string>
| FormatDefinition<string>
| FormatDefinition<number>
| AsyncFormatDefinition<string>
| AsyncFormatDefinition<number> |
1,286,602 | e8d35d0e419f3fd3049a0e90b4369590 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=240-244/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | UriResolver | type | interface UriResolver {
parse(uri: string): URIComponent
resolve(base: string, path: string): string
serialize(component: URIComponent): string
} |
1,286,603 | 1f1a532b0a12eb48704017aa87739f95 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-13/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | _SchemaObject | type | interface _SchemaObject {
id?: string
$id?: string
$schema?: string
[x: string]: any // TODO
} |
1,286,604 | af5975cace9faa0067fc831644b80edd | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-29/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | Schema | type | type Schema = SchemaObject | boolean |
1,286,605 | be0d28c223e47b4e1e3d43babeaccbe7 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=50-58/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | ValidateFunction | type | interface ValidateFunction<T = unknown> {
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
(this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T
errors?: null | ErrorObject[]
evaluated?: Evaluated
schema: AnySchema
schemaEnv: SchemaEnv
source?: SourceCode
} |
1,286,606 | ed72e1a5ddcf72dd5ce74e9389c25ef5 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=66-66/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | EvaluatedProperties | type | type EvaluatedProperties = {[K in string]?: true} | true |
1,286,607 | eb18a0706d4002e19c712fe48e6d47d4 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=119-122/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | CodeKeywordDefinition | type | interface CodeKeywordDefinition extends _KeywordDef {
code: (cxt: KeywordCxt, ruleType?: string) => void
trackErrors?: boolean
} |
1,286,608 | c4349617e87774629923d65ac81c76bf | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=141-149/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | SchemaValidateFunction | type | interface SchemaValidateFunction {
(
schema: any,
data: any,
parentSchema?: AnySchemaObject,
dataCxt?: DataValidationCxt
): boolean | Promise<any>
errors?: Partial<ErrorObject>[]
} |
1,286,609 | 8b9cff78a29ce43396b11b90d1c51e6e | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=151-160/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | FuncKeywordDefinition | type | interface FuncKeywordDefinition extends _KeywordDef {
validate?: SchemaValidateFunction | DataValidateFunction
compile?: CompileKeywordFunc
// schema: false makes validate not to expect schema (DataValidateFunction)
schema?: boolean // requires "validate"
modifying?: boolean
async?: boolean
valid?: boolea... |
1,286,610 | 34ba10c2ef012142c74995ccda59bc13 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=166-169/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | KeywordDefinition | type | type KeywordDefinition =
| CodeKeywordDefinition
| FuncKeywordDefinition
| MacroKeywordDefinition |
1,286,611 | 5793f0dee969bb13727c30dc3cede88e | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=198-198/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | KeywordCxtParams | type | type KeywordCxtParams = {[P in string]?: Code | string | number} |
1,286,612 | 14b9b882f61a81c39d7c0e6d32ef7c79 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=204-204/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | AsyncFormatValidator | type | type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean> |
1,286,613 | 945662934e5fd808019686412eb2a679 | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=206-211/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | FormatDefinition | type | interface FormatDefinition<T extends string | number> {
type?: T extends string ? "string" | undefined : "number"
validate: FormatValidator<T> | (T extends string ? string | RegExp : never)
async?: false | undefined
compare?: FormatCompare<T>
} |
1,286,614 | d07938c5bc604bfeb1f4261c72d753bf | swh:1:cnt:39bc51b0b99d79b09e3e5f0e2d0d48e7bf37c069;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=202-202/ | d23c08cf579155f7a06d91eb4e04ad096bca9eee | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/index.ts | FormatCompare | type | type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined |
1,286,615 | 56c670b3c500987e1eda0efd25de7d79 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-4/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | StrictNullChecksWrapper | type | /* eslint-disable @typescript-eslint/no-empty-interface */
type StrictNullChecksWrapper<Name extends string, Type> = undefined extends null
? `strictNullChecks must be true in tsconfig to use ${Name}`
: Type |
1,286,616 | 577f85ade568495c8a5ccfa78cc79c0b | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=6-8/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | UnionToIntersection | type | type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends (_: infer I) => void
? I
: never |
1,286,617 | 1d010bbe658f042a292535d804ccd0d9 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-12/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | UncheckedPartialSchema | type | type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>> |
1,286,618 | f51a3fa05dc524f5fd4f4adf89ec89fd | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-10/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | SomeJSONSchema | type | type SomeJSONSchema = UncheckedJSONSchemaType<Known, true> |
1,286,619 | 5f9b201c580709c9a3c0dd307524251b | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-14/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | PartialSchema | type | type PartialSchema<T> = StrictNullChecksWrapper<"PartialSchema", UncheckedPartialSchema<T>> |
1,286,620 | 644643623bc16b01567ffe68023e99b9 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-18/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | JSONType | type | type JSONType<T extends string, IsPartial extends boolean> = IsPartial extends true
? T | undefined
: T |
1,286,621 | 0eb793ae5c81cf047178dc1de15de628 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=20-27/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | NumberKeywords | type | interface NumberKeywords {
minimum?: number
maximum?: number
exclusiveMinimum?: number
exclusiveMaximum?: number
multipleOf?: number
format?: string
} |
1,286,622 | 1fa6d2522ac380e2f02b5c96cc343cdb | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=29-34/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | StringKeywords | type | interface StringKeywords {
minLength?: number
maxLength?: number
pattern?: string
format?: string
} |
1,286,623 | dee156fb36535640fa8e2815662df56d | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=36-141/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | UncheckedJSONSchemaType | type | type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (
| // these two unions allow arbitrary unions of types
{
anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
| {
oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
// this union allows for { type: (primitive)[] } styl... |
1,286,624 | 5653b2237117f0c361ee1460d49f6121 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=143-146/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | JSONSchemaType | type | type JSONSchemaType<T> = StrictNullChecksWrapper<
"JSONSchemaType",
UncheckedJSONSchemaType<T, false>
> |
1,286,625 | 9aeef3caf837c6ea3c47e86cd5d3c8ab | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=157-159/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | UncheckedPropertiesSchema | type | type UncheckedPropertiesSchema<T> = {
[K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | {$ref: string}
} |
1,286,626 | 8737c293b746fa6de0b0ef1af8253be1 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=161-164/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | PropertiesSchema | type | type PropertiesSchema<T> = StrictNullChecksWrapper<
"PropertiesSchema",
UncheckedPropertiesSchema<T>
> |
1,286,627 | 723b21e2a2cfaaa374632d475ebd7633 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=166-168/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | UncheckedRequiredMembers | type | type UncheckedRequiredMembers<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K
}[keyof T] |
1,286,628 | 78e01a9e4dd33c06b2dabed5a3b7cf42 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=148-155/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | Known | type | type Known =
| {[key: string]: Known}
| [Known, ...Known[]]
| Known[]
| number
| string
| boolean
| null |
1,286,629 | 34d358514813ce3d44529e537fb67117 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=170-173/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | RequiredMembers | type | type RequiredMembers<T> = StrictNullChecksWrapper<
"RequiredMembers",
UncheckedRequiredMembers<T>
> |
1,286,630 | 38ac13845d4128863007dbf9fe4558a5 | swh:1:cnt:065c972e54a179b74e9dee48fdea8a1c2d45c8a1;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=175-187/ | 46a8ddb43fe5527b419c48d4e1408b947cb53337 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/json-schema.ts | Nullable | type | type Nullable<T> = undefined extends T
? {
nullable: true
const?: null // any non-null value would fail `const: null`, `null` would fail any other value in const
enum?: readonly (T | null)[] // `null` must be explicitly included in "enum" for `null` to pass
default?: T | null
}
: {
... |
1,286,631 | 26bc5813882389c2c08f458193182e2e | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=1-2/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | NumberType | type | /** numeric strings */
type NumberType = "float32" | "float64" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32" |
1,286,632 | d4c2beb3037b803ec1616c8b7d9c7d8c | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-51/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | OptionalKeys | type | /** optional or undifined-able keys of an object */
type OptionalKeys<T> = {
[K in keyof T]-?: undefined extends T[K] ? K : never
}[keyof T] |
1,286,633 | cc2f1a0521a6830c305e8bd9281a954d | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-41/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | SomeJTDSchemaType | type | type SomeJTDSchemaType = (
| // ref
{ref: string}
// primitives
| {type: NumberType | StringType | "boolean"}
// enum
| {enum: string[]}
// elements
| {elements: SomeJTDSchemaType}
// values
| {values: SomeJTDSchemaType}
// properties
| {
properties: Record<string, SomeJTDSchemaType>
... |
1,286,634 | 752388d67289ff6b38b76d4e5757deb3 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-5/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | StringType | type | /** string strings */
type StringType = "string" | "timestamp" |
1,286,635 | 7bc594edb837053a134041f162485088 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=43-46/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | RequiredKeys | type | /** required keys of an object, not undefined */
type RequiredKeys<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K
}[keyof T] |
1,286,636 | 76cb3b895ce4489eef97bdfa9542bd46 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=53-58/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsUnion_ | type | /** type is true if T is a union type */
type IsUnion_<T, U extends T = T> = false extends (
T extends unknown ? ([U] extends [T] ? false : true) : never
)
? false
: true |
1,286,637 | e4bb3109bbd00c448dff979b92f85899 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=59-59/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsUnion | type | type IsUnion<T> = IsUnion_<T> |
1,286,638 | 3f942683a1e1e89c9e17f7166e12513a | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=61-62/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | TypeEquality | type | /** type is true if T is identically E */
type TypeEquality<T, E> = [T] extends [E] ? ([E] extends [T] ? true : false) : false |
1,286,639 | 8ef6435f6a6046d1dcf9b430f05dbb96 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=64-65/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | NullTypeEquality | type | /** type is true if T or null is identically E or null*/
type NullTypeEquality<T, E> = TypeEquality<T | null, E | null> |
1,286,640 | 07085ebcca6d4e20f981886971041da7 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=67-74/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | EnumString | type | /** gets only the string literals of a type or null if a type isn't a string literal */
type EnumString<T> = [T] extends [never]
? null
: T extends string
? string extends T
? null
: T
: null |
1,286,641 | f0338ec6916ede555218303f9df9aa13 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=90-91/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsValues | type | /** true if the the type is a values type */
type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false |
1,286,642 | 4ec54df0701ddebfbac8d9ee5ddff700 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=209-269/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | JTDDataDef | type | type JTDDataDef<S, D extends Record<string, unknown>> =
| // ref
(S extends {ref: string}
? D extends {[K in S["ref"]]: infer V}
? JTDDataDef<V, D>
: never
: // type
S extends {type: NumberType}
? number
: S extends {type: "boolean"}
? boolean
: S extends {t... |
1,286,643 | bf70653fb3949db7f2d9738e6a67afa8 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=108-207/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | JTDSchemaType | type | type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = (
| // refs - where null wasn't specified, must match exactly
(null extends EnumString<keyof D>
? never
:
| ({[K in keyof D]: [T] extends [D[K]] ? {ref: K} : never}[keyof D] & {nullable?: false})
// nu... |
1,286,644 | fa088feabaf192e826d90374baea990e | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=76-77/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsEnum | type | /** true if type is a union of string literals */
type IsEnum<T> = null extends EnumString<T> ? false : true |
1,286,645 | aaf09e9b1e18da7ff75a7565fbffad79 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=271-273/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | JTDDataType | type | type JTDDataType<S> = S extends {definitions: Record<string, unknown>}
? JTDDataDef<S, S["definitions"]>
: JTDDataDef<S, Record<string, never>> |
1,286,646 | 4b6b6049435492e9e9d8ccc1cb1472b9 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=93-98/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsRecord | type | /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */
type IsRecord<T, Union extends boolean> = Union extends IsUnion<T>
? null extends EnumString<keyof T>
? false
: true
: false |
1,286,647 | c7b5375e2cfef7cb1254458312ce9de2 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=100-105/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsEmptyRecord | type | /** true if type represents an empty record */
type IsEmptyRecord<T> = [T] extends [Record<string, never>]
? [T] extends [never]
? false
: true
: false |
1,286,648 | 6acfd7f09b2126e642f2351e80f9a063 | swh:1:cnt:61b2bde81d5f5d407971855d0a2c8125aeb53463;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=79-88/ | 8bfe5db5e3a704704946db3bec88db41b85c9b6e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/types/jtd-schema.ts | IsElements | type | /** true only if all types are array types (not tuples) */
// NOTE relies on the fact that tuples don't have an index at 0.5, but arrays
// have an index at every number
type IsElements<T> = false extends IsUnion<T>
? [T] extends [readonly unknown[]]
? undefined extends T[0.5]
? false
: true
: fal... |
1,286,649 | 37c3b445440a13f681ef866fec70f15f | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-14/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | checkReportMissingProp | function | function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {
const {gen, data, it} = cxt
gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
cxt.setParams({missingProperty: _`${prop}`}, true)
cxt.error()
})
} |
1,286,650 | b83d57417fdaf4dd7bdc013bf1a75639 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=16-26/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | checkMissingProp | function | function checkMissingProp(
{gen, data, it: {opts}}: KeywordCxt,
properties: string[],
missing: Name
): Code {
return or(
...properties.map((prop) =>
and(noPropertyInData(gen, data, prop, opts.ownProperties), _`${missing} = ${prop}`)
)
)
} |
1,286,651 | f1258640e151437457b289d5db86ec01 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=33-39/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | hasPropFunc | function | function hasPropFunc(gen: CodeGen): Name {
return gen.scopeValue("func", {
// eslint-disable-next-line @typescript-eslint/unbound-method
ref: Object.prototype.hasOwnProperty,
code: _`Object.prototype.hasOwnProperty`,
})
} |
1,286,652 | 8c9a01688416589360c82fadde212545 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=41-43/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | isOwnProperty | function | function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code {
return _`${hasPropFunc(gen)}.call(${data}, ${property})`
} |
1,286,653 | b969da197b605f34f72109d595ebbef3 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=28-31/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | reportMissingProp | function | function reportMissingProp(cxt: KeywordCxt, missing: Name): void {
cxt.setParams({missingProperty: missing}, true)
cxt.error()
} |
1,286,654 | 79f7662948559fdc1e3f03bfbd8ffd78 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=45-53/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | propertyInData | function | function propertyInData(
gen: CodeGen,
data: Name,
property: Name | string,
ownProperties?: boolean
): Code {
const cond = _`${data}${getProperty(property)} !== undefined`
return ownProperties ? _`${cond} && ${isOwnProperty(gen, data, property)}` : cond
} |
1,286,655 | 46b806e59c8548efbeca13d829b6ba85 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=55-63/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | noPropertyInData | function | function noPropertyInData(
gen: CodeGen,
data: Name,
property: Name | string,
ownProperties?: boolean
): Code {
const cond = _`${data}${getProperty(property)} === undefined`
return ownProperties ? or(cond, not(isOwnProperty(gen, data, property))) : cond
} |
1,286,656 | 5f90ef1b888a47792b921a553cf5a317 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=65-67/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | allSchemaProperties | function | function allSchemaProperties(schemaMap?: SchemaMap): string[] {
return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []
} |
1,286,657 | 9fa09ac9bc75f76478ef122665f3fc02 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=69-73/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | schemaProperties | function | function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[] {
return allSchemaProperties(schemaMap).filter(
(p) => !alwaysValidSchema(it, schemaMap[p] as AnySchema)
)
} |
1,286,658 | 17aa002acfc1e575b0540d501c94b42f | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=75-91/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | callValidateCode | function | function callValidateCode(
{schemaCode, data, it: {gen, topSchemaRef, schemaPath, errorPath}, it}: KeywordCxt,
func: Code,
context: Code,
passSchema?: boolean
): Code {
const dataAndSchema = passSchema ? _`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data
const valCxt: [Name, Code | number][] = [... |
1,286,659 | 94659d59a43782c3f61e54cc1dd9b414 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=107-133/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | validateArray | function | function validateArray(cxt: KeywordCxt): Name {
const {gen, data, keyword, it} = cxt
const valid = gen.name("valid")
if (it.allErrors) {
const validArr = gen.let("valid", true)
validateItems(() => gen.assign(validArr, false))
return validArr
}
gen.var(valid, true)
validateItems(() => gen.break()... |
1,286,660 | e62a4179f8027ba471d8bfe8ed9fe7e3 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=119-132/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | validateArray::validateItems | function | function validateItems(notValid: () => void): void {
const len = gen.const("len", _`${data}.length`)
gen.forRange("i", 0, len, (i) => {
cxt.subschema(
{
keyword,
dataProp: i,
dataPropType: Type.Num,
},
valid
)
gen.if(not(valid), notValid)
... |
1,286,661 | 38977ab248da4bd2f219e58734f95b22 | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=135-168/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | validateUnion | function | function validateUnion(cxt: KeywordCxt): void {
const {gen, schema, keyword, it} = cxt
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
const alwaysValid = schema.some((sch: AnySchema) => alwaysValidSchema(it, sch))
if (alwaysValid && !it.opts.unevaluated) retur... |
1,286,662 | 296f130ffed67f850e3e2dc1001d03fa | swh:1:cnt:92cdd5b04ef30e0ed6f3c9025752f0acf59370eb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=95-105/ | 7000605f72de9ab1540d3890dafbb1fe06a622c9 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/code.ts | usePattern | function | function usePattern({gen, it: {opts}}: KeywordCxt, pattern: string): Name {
const u = opts.unicodeRegExp ? "u" : ""
const {regExp} = opts.code
const rx = regExp(pattern, u)
return gen.scopeValue("pattern", {
key: rx.toString(),
ref: rx,
code: _`${regExp.code === "new RegExp" ? newRegExp : useFunc(g... |
1,286,663 | 4f80ba04ae23dd798b7f1a0029f5004c | swh:1:cnt:c9ca3f02f040298cd2b2faff35740eaae6ea098e;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=10-18/ | ba9888dd986e2ce7841aa40923fc41b92a8d5b7b | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/errors.ts | DefinedError | type | type DefinedError =
| TypeError
| ApplicatorKeywordError
| ValidationKeywordError
| FormatError
| UnevaluatedPropertiesError
| UnevaluatedItemsError
| DependentRequiredError
| DiscriminatorError |
1,286,664 | 3b4a57614c28c3c02dcb4bee37dd7457 | swh:1:cnt:755e5b3daf551d68ffbe3bd45884ee650094a46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-11/ | 197a44e3dfe7782ab16d23bcd3688fe0c27f8041 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts | AdditionalItemsError | type | type AdditionalItemsError = ErrorObject<"additionalItems", {limit: number}, AnySchema> |
1,286,665 | 02a43872e859d953707f89d259c2aace | swh:1:cnt:755e5b3daf551d68ffbe3bd45884ee650094a46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=24-32/ | 197a44e3dfe7782ab16d23bcd3688fe0c27f8041 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts | code | function | code(cxt: KeywordCxt) {
const {parentSchema, it} = cxt
const {items} = parentSchema
if (!Array.isArray(items)) {
checkStrictMode(it, '"additionalItems" is ignored when "items" is not an array of schemas')
return
}
validateAdditionalItems(cxt, items)
} |
1,286,666 | 47a0c4bb60cf7f0685fce6db691e30c8 | swh:1:cnt:755e5b3daf551d68ffbe3bd45884ee650094a46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=35-54/ | 197a44e3dfe7782ab16d23bcd3688fe0c27f8041 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts | validateAdditionalItems | function | function validateAdditionalItems(cxt: KeywordCxt, items: AnySchema[]): void {
const {gen, schema, data, keyword, it} = cxt
it.items = true
const len = gen.const("len", _`${data}.length`)
if (schema === false) {
cxt.setParams({len: items.length})
cxt.pass(_`${len} <= ${items.length}`)
} else if (typeof... |
1,286,667 | cfba3c0a2f90c9f74ce3ad55e9f2bcf1 | swh:1:cnt:755e5b3daf551d68ffbe3bd45884ee650094a46d;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-53/ | 197a44e3dfe7782ab16d23bcd3688fe0c27f8041 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts | validateAdditionalItems::validateItems | function | function validateItems(valid: Name): void {
gen.forRange("i", items.length, len, (i) => {
cxt.subschema({keyword, dataProp: i, dataPropType: Type.Num}, valid)
if (!it.allErrors) gen.if(not(valid), () => gen.break())
})
} |
1,286,668 | 7c45ce1a20de14d45fad65a2cd64e702 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=14-18/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | AdditionalPropertiesError | type | type AdditionalPropertiesError = ErrorObject<
"additionalProperties",
{additionalProperty: string},
AnySchema
> |
1,286,669 | 94fac64a96650f1411b867efec772ef1 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=51-66/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code::isAdditional | function | function isAdditional(key: Name): Code {
let definedProp: Code
if (props.length > 8) {
// TODO maybe an option instead of hard-coded 8?
const propsSchema = schemaRefOrVal(it, parentSchema.properties, "properties")
definedProp = isOwnProperty(gen, propsSchema as Code, key)
} els... |
1,286,670 | ee85f0d34a78bd7dcaa27ed9567675c0 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=44-49/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code::checkAdditionalProperties | function | function checkAdditionalProperties(): void {
gen.forIn("key", data, (key: Name) => {
if (!props.length && !patProps.length) additionalPropertyCode(key)
else gen.if(isAdditional(key), () => additionalPropertyCode(key))
})
} |
1,286,671 | 41b2be65571ca70e3eb84a0f60f341e5 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=72-98/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code::additionalPropertyCode | function | function additionalPropertyCode(key: Name): void {
if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) {
deleteAdditional(key)
return
}
if (schema === false) {
cxt.setParams({additionalProperty: key})
cxt.error()
if (!allErrors) ... |
1,286,672 | 516c365fc05093c17b4a19f479ffb223 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=68-70/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code::deleteAdditional | function | function deleteAdditional(key: Name): void {
gen.code(_`delete ${data}[${key}]`)
} |
1,286,673 | 475d4a90c1995f6cb941f0fb9979b181 | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=100-114/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code::applyAdditionalSchema | function | function applyAdditionalSchema(key: Name, valid: Name, errors?: false): void {
const subschema: SubschemaArgs = {
keyword: "additionalProperties",
dataProp: key,
dataPropType: Type.Str,
}
if (errors === false) {
Object.assign(subschema, {
compositeRule: true,
... |
1,286,674 | e04299fcc5ff3a39bd76111b5ec5c98a | swh:1:cnt:bfb511ce5100f4902f0f9c17ce7d7886e95fcabc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=32-115/ | fb1fc183f9ae5f96705f5707941d20172e767d25 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts | code | function | code(cxt) {
const {gen, schema, parentSchema, data, errsCount, it} = cxt
/* istanbul ignore if */
if (!errsCount) throw new Error("ajv implementation error")
const {allErrors, opts} = it
it.props = true
if (opts.removeAdditional !== "all" && alwaysValidSchema(it, schema)) return
const props ... |
1,286,675 | 6162847a3ce91baecec57a57ab197360 | swh:1:cnt:cdfa86ff431396a7cf68b937cb9baa69d4e79f29;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=8-19/ | 5b8861200684a21ad61b0e35f1c768ebf607a232 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/allOf.ts | code | function | code(cxt: KeywordCxt) {
const {gen, schema, it} = cxt
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
const valid = gen.name("valid")
schema.forEach((sch: AnySchema, i: number) => {
if (alwaysValidSchema(it, sch)) return
const schCxt = cxt... |
1,286,676 | 87e90c50993222d7a153302c8ffbca33 | swh:1:cnt:bd331b5ae98a72f1a6d79aacdf2d4babd16bde35;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=4-4/ | c965f2877f757ab2ccd0f0813208c04e7ea6209e | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts | AnyOfError | type | type AnyOfError = ErrorNoParams<"anyOf", AnySchema[]> |
1,286,677 | 2041443ce3b4216243b07f25ec9ec9cc | swh:1:cnt:d88675c6c2a21db9fa9e0ce497646fda1bf5d5a6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=11-15/ | 2eed546702ce7b0e9a5b511c65d956ce1c32a4fa | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/contains.ts | ContainsError | type | type ContainsError = ErrorObject<
"contains",
{minContains: number; maxContains?: number},
AnySchema
> |
1,286,678 | d81282ae94a80c14174a42468a5bbfa4 | swh:1:cnt:d88675c6c2a21db9fa9e0ce497646fda1bf5d5a6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=33-106/ | 2eed546702ce7b0e9a5b511c65d956ce1c32a4fa | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/contains.ts | code | function | code(cxt: KeywordCxt) {
const {gen, schema, parentSchema, data, it} = cxt
let min: number
let max: number | undefined
const {minContains, maxContains} = parentSchema
if (it.opts.next) {
min = minContains === undefined ? 1 : minContains
max = maxContains
} else {
min = 1
}
... |
1,286,679 | 97501092501bc18e8245ea01f21256ac | swh:1:cnt:d88675c6c2a21db9fa9e0ce497646fda1bf5d5a6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=75-79/ | 2eed546702ce7b0e9a5b511c65d956ce1c32a4fa | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/contains.ts | code::validateItemsWithCount | function | function validateItemsWithCount(): void {
const schValid = gen.name("_valid")
const count = gen.let("count", 0)
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)))
} |
1,286,680 | c9121bcd0410e5184e51502fab102d37 | swh:1:cnt:d88675c6c2a21db9fa9e0ce497646fda1bf5d5a6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=96-105/ | 2eed546702ce7b0e9a5b511c65d956ce1c32a4fa | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/contains.ts | code::checkLimits | function | function checkLimits(count: Name): void {
gen.code(_`${count}++`)
if (max === undefined) {
gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true).break())
} else {
gen.if(_`${count} > ${max}`, () => gen.assign(valid, false).break())
if (min === 1) gen.assign(valid, true)
... |
1,286,681 | 1eb04348b611f5513b53ac7dcb9a2a2c | swh:1:cnt:d88675c6c2a21db9fa9e0ce497646fda1bf5d5a6;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=81-94/ | 2eed546702ce7b0e9a5b511c65d956ce1c32a4fa | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/contains.ts | code::validateItems | function | function validateItems(_valid: Name, block: () => void): void {
gen.forRange("i", 0, len, (i) => {
cxt.subschema(
{
keyword: "contains",
dataProp: i,
dataPropType: Type.Num,
compositeRule: true,
},
_valid
)
block... |
1,286,682 | e88cc81d077c3fe46cc3c1cebaff9370 | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=13-13/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | PropertyDependencies | type | type PropertyDependencies = {[K in string]?: string[]} |
1,286,683 | 07c931ccdda7022ddcbaea60e8ba1e4b | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=22-22/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | SchemaDependencies | type | type SchemaDependencies = SchemaMap |
1,286,684 | 73da034e5c750f1b4fc54c6fab0d5dfc | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=15-20/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | DependenciesErrorParams | type | interface DependenciesErrorParams {
property: string
missingProperty: string
depsCount: number
deps: string // TODO change to string[]
} |
1,286,685 | 09693fed1533bed7a4a4e0c6c9b89df9 | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=24-28/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | DependenciesError | type | type DependenciesError = ErrorObject<
"dependencies",
DependenciesErrorParams,
{[K in string]?: string[] | AnySchema}
> |
1,286,686 | 998c7763aae615dcef83244208c358ab | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=47-51/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | code | function | code(cxt: KeywordCxt) {
const [propDeps, schDeps] = splitDependencies(cxt)
validatePropertyDeps(cxt, propDeps)
validateSchemaDeps(cxt, schDeps)
} |
1,286,687 | 3135216df9325af5265e68ac5207dfbb | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=95-110/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | validateSchemaDeps | function | function validateSchemaDeps(cxt: KeywordCxt, schemaDeps: SchemaMap = cxt.schema): void {
const {gen, data, keyword, it} = cxt
const valid = gen.name("valid")
for (const prop in schemaDeps) {
if (alwaysValidSchema(it, schemaDeps[prop] as AnySchema)) continue
gen.if(
propertyInData(gen, data, prop, it... |
1,286,688 | f3263de282e17f1972c0f7733ca79361 | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=65-93/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | validatePropertyDeps | function | function validatePropertyDeps(
cxt: KeywordCxt,
propertyDeps: {[K in string]?: string[]} = cxt.schema
): void {
const {gen, data, it} = cxt
if (Object.keys(propertyDeps).length === 0) return
const missing = gen.let("missing")
for (const prop in propertyDeps) {
const deps = propertyDeps[prop] as string[]... |
1,286,689 | cf7f103b9eb584a92879e05c0ec86ced | swh:1:cnt:f6761128698689ce1d4699c33a3b128516157eeb;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=54-63/ | 30b2c8e1cfc5e9322a1c39a3eafa1f61881fc3d2 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts | splitDependencies | function | function splitDependencies({schema}: KeywordCxt): [PropertyDependencies, SchemaDependencies] {
const propertyDeps: PropertyDependencies = {}
const schemaDeps: SchemaDependencies = {}
for (const key in schema) {
if (key === "__proto__") continue
const deps = Array.isArray(schema[key]) ? propertyDeps : sche... |
1,286,690 | 029390e3e2744c11626dd82c9fc39874 | swh:1:cnt:5a40d5e3ad2ca0ee8bffb0bc10c361580a15378f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-12/ | f2dce9636795ca01d99a6581ee7daaeb5388c377 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/if.ts | IfKeywordError | type | type IfKeywordError = ErrorObject<"if", {failingKeyword: string}, AnySchema> |
1,286,691 | 428d70a297b942c8a05948101aeb739e | swh:1:cnt:5a40d5e3ad2ca0ee8bffb0bc10c361580a15378f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=24-72/ | f2dce9636795ca01d99a6581ee7daaeb5388c377 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/if.ts | code | function | code(cxt: KeywordCxt) {
const {gen, parentSchema, it} = cxt
if (parentSchema.then === undefined && parentSchema.else === undefined) {
checkStrictMode(it, '"if" without "then" and "else" is ignored')
}
const hasThen = hasSchema(it, "then")
const hasElse = hasSchema(it, "else")
if (!hasThen ... |
1,286,692 | 82b66b7a5aa32a5a0cdd8d65ede8c8c0 | swh:1:cnt:5a40d5e3ad2ca0ee8bffb0bc10c361580a15378f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=75-78/ | f2dce9636795ca01d99a6581ee7daaeb5388c377 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/if.ts | hasSchema | function | function hasSchema(it: SchemaObjCxt, keyword: string): boolean {
const schema = it.schema[keyword]
return schema !== undefined && !alwaysValidSchema(it, schema)
} |
1,286,693 | e9ee3411fb28afdd9b410ce661306785 | swh:1:cnt:5a40d5e3ad2ca0ee8bffb0bc10c361580a15378f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=63-71/ | f2dce9636795ca01d99a6581ee7daaeb5388c377 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/if.ts | code::validateClause | function | function validateClause(keyword: string, ifClause?: Name): () => void {
return () => {
const schCxt = cxt.subschema({keyword}, schValid)
gen.assign(valid, schValid)
cxt.mergeValidEvaluated(schCxt, valid)
if (ifClause) gen.assign(ifClause, _`${keyword}`)
else cxt.setParams({... |
1,286,694 | 299fdd5d9cfa6065337ce5d62623631c | swh:1:cnt:5a40d5e3ad2ca0ee8bffb0bc10c361580a15378f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=50-61/ | f2dce9636795ca01d99a6581ee7daaeb5388c377 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/if.ts | code::validateIf | function | function validateIf(): void {
const schCxt = cxt.subschema(
{
keyword: "if",
compositeRule: true,
createErrors: false,
allErrors: false,
},
schValid
)
cxt.mergeEvaluated(schCxt)
} |
1,286,695 | 99263f797fd337fdecd8d2c438faee1a | swh:1:cnt:fc527169967c8e3ae32b13ee19c9ad20dc5794cc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=19-40/ | 6a171dac520052ab8b1e7ca79f5d975119fd2e5f | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/index.ts | getApplicator | function | function getApplicator(draft2020 = false): Vocabulary {
const applicator = [
// any
notKeyword,
anyOf,
oneOf,
allOf,
ifKeyword,
thenElse,
// object
propertyNames,
additionalProperties,
dependencies,
properties,
patternProperties,
]
// array
if (draft2020) appl... |
1,286,696 | 5e6ca7590ad6961a8f763d7d76bf4e36 | swh:1:cnt:fc527169967c8e3ae32b13ee19c9ad20dc5794cc;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=42-53/ | 6a171dac520052ab8b1e7ca79f5d975119fd2e5f | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/index.ts | ApplicatorKeywordError | type | type ApplicatorKeywordError =
| ErrorNoParams<"false schema">
| AdditionalItemsError
| ItemsError
| ContainsError
| AdditionalPropertiesError
| DependenciesError
| IfKeywordError
| AnyOfError
| OneOfError
| NotKeywordError
| PropertyNamesError |
1,286,697 | d06db7182bf30151d522b613c02e2fa1 | swh:1:cnt:033cb3977342222bc90a44251bc9366b151cff9f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=12-18/ | ce228bb25a0b6f970bb8dd919c175d22a2732239 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/items.ts | code | function | code(cxt: KeywordCxt) {
const {schema, it} = cxt
if (Array.isArray(schema)) return validateTuple(cxt, "additionalItems", schema)
it.items = true
if (alwaysValidSchema(it, schema)) return
cxt.ok(validateArray(cxt))
} |
1,286,698 | 7d1a46b67a1b842cad1db7dfc7f4206a | swh:1:cnt:033cb3977342222bc90a44251bc9366b151cff9f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=21-57/ | ce228bb25a0b6f970bb8dd919c175d22a2732239 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/items.ts | validateTuple | function | function validateTuple(
cxt: KeywordCxt,
extraItems: string,
schArr: AnySchema[] = cxt.schema
): void {
const {gen, parentSchema, data, keyword, it} = cxt
checkStrictTuple(parentSchema)
if (it.opts.unevaluated && schArr.length && it.items !== true) {
it.items = mergeEvaluated.items(gen, schArr.length, i... |
1,286,699 | 2cb72f66d3313c99d79bb1e66c790e12 | swh:1:cnt:033cb3977342222bc90a44251bc9366b151cff9f;origin=https://gitlab.wikimedia.org/toolforge-repos/wlbdashboard.git;lines=48-56/ | ce228bb25a0b6f970bb8dd919c175d22a2732239 | wlbdashboard | wmcs | node_modules/workbox-build/node_modules/ajv/lib/vocabularies/applicator/items.ts | validateTuple::checkStrictTuple | function | function checkStrictTuple(sch: AnySchemaObject): void {
const {opts, errSchemaPath} = it
const l = schArr.length
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)
if (opts.strictTuples && !fullTuple) {
const msg = `"${keyword}" is ${l}-tuple, but minItems or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.