Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TaskSchemaUpdater

Hierarchy

  • TaskSchemaUpdater

Implements

  • JsonSchemaContribution

Index

Constructors

Properties

doValidate: undefined | ValidateFunction
inmemoryResources: InMemoryResources
onDidChangeTaskSchema: Event<void> = ...
onDidChangeTaskSchemaEmitter: Emitter<void> = ...
problemMatcherRegistry: ProblemMatcherRegistry
taskDefinitionRegistry: TaskDefinitionRegistry
taskServer: TaskServer
update: ((...arguments: []) => Promise<void>) = ...

Type declaration

    • (...arguments: []): Promise<void>
    • Debounce promise-returning & async functions.

      example
      import pDebounce = require('p-debounce');

      const expensiveCall = async input => input;

      const debouncedFn = pDebounce(expensiveCall, 200);

      for (const i of [1, 2, 3]) {
      debouncedFn(i).then(console.log);
      }
      //=> 3
      //=> 3
      //=> 3

      Parameters

      • Rest ...arguments: []

      Returns Promise<void>

      A function that delays calling fn until after wait milliseconds have elapsed since the last time it was called.

uri: URI = ...
workspaceService: WorkspaceService

Methods

  • addSubschema(schema: IJSONSchema): void
  • Adds given task schema to taskConfigurationSchema as oneOf subschema. Replaces existed subschema by given schema if the corresponding $id properties are equal.

    Note: please provide $id property for subschema to have ability remove/replace it.

    Parameters

    • schema: IJSONSchema

      subschema for adding to taskConfigurationSchema

    Returns void

  • doRemoveSubschema(arg: string): boolean
  • Removes task subschema from customSchemas, use update() to apply the changes for taskConfigurationSchema.

    Parameters

    • arg: string

      $id property of subschema

    Returns boolean

    true if subschema was removed, false otherwise

  • doUpdate(): void
  • getRegisteredTaskTypes(): Promise<string[]>
  • getTaskSchema(): IJSONSchema & { default: JSONObject }
  • init(): void
  • registerSchemas(context: JsonSchemaRegisterContext): void
  • removeSubschema(arg: string): void
  • updateProblemMatcherNames(): void
  • updateSchemasForRegisteredTasks(): void
  • updateSupportedTaskTypes(): Promise<void>
  • validate(data: any): boolean