Variable specValueTemplatesConst

specValueTemplates: {
    boolean: readonly ["boolean", "true if ", "(boolean)"];
    number: readonly ["number", null, "(number)"];
    number[]: readonly ["array of numbers", "array of numbers", "(array of numbers)"];
    string: readonly ["string", "string", "(string)"];
    string[]: readonly ["array of strings", "array of strings", "(array of strings)"];
} = ...

Actual templates used to match Specs item values (i.e. descriptions).

  • If the description is exactly "number" or ends with "(number)", the type will be inferred as a number.
  • If the description is exactly "boolean" or starts with "true if " or ends with "(boolean)", the type will be inferred as a boolean.
  • If the description is exactly or starts with "array of numbers" or ends with "(array of numbers)", the type will be inferred as number[].
  • If the description is exactly or starts with "array of strings" or ends with "(array of strings)", the type will be inferred as string[].
  • If the description is exactly or starts with "string" or ends with "(string)", the type will be inferred as a string.
  • Otherwise, the type will be inferred as a string.

Type declaration

  • Readonly boolean: readonly ["boolean", "true if ", "(boolean)"]
  • Readonly number: readonly ["number", null, "(number)"]
  • Readonly number[]: readonly ["array of numbers", "array of numbers", "(array of numbers)"]
  • Readonly string: readonly ["string", "string", "(string)"]
  • Readonly string[]: readonly ["array of strings", "array of strings", "(array of strings)"]

Generated using TypeDoc