Options
All
  • Public
  • Public/Protected
  • All
Menu

The interface for a model factory.

Type parameters

Hierarchy

  • IDisposable
    • IModelFactory

Implemented by

Index

Properties

contentType

contentType: ContentType

The content type of the file (defaults to "file").

fileFormat

fileFormat: FileFormat

The format of the file (defaults to "text").

isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

name

name: string

The name of the model.

Methods

createNew

  • createNew(languagePreference?: undefined | string, modelDB?: IModelDB): T
  • Create a new model for a given path.

    Parameters

    • Optional languagePreference: undefined | string

      An optional kernel language preference.

    • Optional modelDB: IModelDB

    Returns T

    A new document model.

dispose

  • dispose(): void
  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

preferredLanguage

  • preferredLanguage(path: string): string

Generated using TypeDoc