Variable specKeyTemplatesConst

specKeyTemplates: {
    boolean: readonly [null, "is", "Boolean"];
    number: readonly [null, null, "Number"];
    string: readonly [null, null, "String"];
    string[]: readonly [null, null, "Array"];
} = ...

Actual templates used to match Specs item keys.

  • If the key starts with "is" or ends with "Boolean", the type will be inferred as a boolean. NOTE: This will also be triggered on "normal" words starting with "is", e.g. "island", so avoid such words.
  • If the key ends with "Array", the type will be inferred as string[].
  • If the key ends with "String", the type will be inferred as a string.
  • Otherwise, the type will be inferred as a string or according to specValueTemplates, where applicable.

Type declaration

  • Readonly boolean: readonly [null, "is", "Boolean"]
  • Readonly number: readonly [null, null, "Number"]
  • Readonly string: readonly [null, null, "String"]
  • Readonly string[]: readonly [null, null, "Array"]

Generated using TypeDoc