Skip to content

defineExtension

defineExtension<E>(extension): E

Identity function with a precise parameter type, so export default defineExtension({ ... }) gets full editor autocomplete and type-checking with no extra annotation. It returns the object’s own type, so tests can call extension.update(ctx) or extension.tools.lookup.run(...) directly.

Type Parameter
E extends Extension
Parameter Type
extension E

E