documentationfor yFiles for HTML 2.6

MarkupDescriptor<T>

A utility type that can be used to give the static $meta property of a TypeScript class a type other than any.

Inheritance Hierarchy
MarkupDescriptor

Remarks

The type automatically collects all properties of the class and expects an object that maps property names to Attributes or arrays of them.

Attributes for the class itself are annotated using the special $self key.

Example:

class MyClass extends MarkupExtension {
  get myProperty(): any { ... }
  set myProperty(v: any) { ... }

  static get $meta(): MarkupDescriptor<MyClass> {
    return {
      myProperty: [GraphMLAttribute().init({})]
    }
  }
}

Type Parameters

T
The type of surrounding class.

Type Details

yfiles module
lang
yfiles-umd modules
All modules
Legacy UMD name
yfiles.lang.MarkupDescriptor