Skip to content

rune-langium / codegen/src/export / createProjectBindingRegistry

Function: createProjectBindingRegistry() ​

ts
function createProjectBindingRegistry(input): {
  implementationSymbols: {
     dispatch?: string;
     kind: string;
     model: string;
     name: string;
     namespace: string;
  }[];
  invokeByKey: (key, args) => unknown;
  codeList(symbol): 
     | readonly CodeListValue[]
    | undefined;
  codeListForType(type): 
     | readonly CodeListValue[]
    | undefined;
  implementationStatus(targetId): 
     | {
     available: boolean;
     reason: string | undefined;
   }
    | undefined;
  invoke(symbol, args): unknown;
  validateCode(symbol, value): 
     | {
     message: string;
     path: string;
   }
    | undefined;
};

Defined in: packages/codegen/src/runtime/project-bindings.ts:29

Prepared data and installed callbacks only; this module never reads configuration or loads code.

Parameters ​

ParameterType
input{ codeLists?: readonly ProjectCodeListBinding[]; implementations?: readonly ProjectImplementationBinding[]; unavailableFunctions?: readonly { reason: string; symbol: { dispatch?: string; kind: string; model: string; name: string; namespace: string; }; }[]; }
input.codeLists?readonly ProjectCodeListBinding[]
input.implementations?readonly ProjectImplementationBinding[]
input.unavailableFunctions?readonly { reason: string; symbol: { dispatch?: string; kind: string; model: string; name: string; namespace: string; }; }[]

Returns ​

ts
{
  implementationSymbols: {
     dispatch?: string;
     kind: string;
     model: string;
     name: string;
     namespace: string;
  }[];
  invokeByKey: (key, args) => unknown;
  codeList(symbol): 
     | readonly CodeListValue[]
    | undefined;
  codeListForType(type): 
     | readonly CodeListValue[]
    | undefined;
  implementationStatus(targetId): 
     | {
     available: boolean;
     reason: string | undefined;
   }
    | undefined;
  invoke(symbol, args): unknown;
  validateCode(symbol, value): 
     | {
     message: string;
     path: string;
   }
    | undefined;
}
NameTypeDefined in
implementationSymbols{ dispatch?: string; kind: string; model: string; name: string; namespace: string; }[]packages/codegen/src/runtime/project-bindings.ts:85
invokeByKey()(key, args) => unknownpackages/codegen/src/runtime/project-bindings.ts:118
codeList()(symbol) => | readonly CodeListValue[] | undefinedpackages/codegen/src/runtime/project-bindings.ts:104
codeListForType()(type) => | readonly CodeListValue[] | undefinedpackages/codegen/src/runtime/project-bindings.ts:108
implementationStatus()(targetId) => | { available: boolean; reason: string | undefined; } | undefinedpackages/codegen/src/runtime/project-bindings.ts:86
invoke()(symbol, args) => unknownpackages/codegen/src/runtime/project-bindings.ts:119
validateCode()(symbol, value) => | { message: string; path: string; } | undefinedpackages/codegen/src/runtime/project-bindings.ts:112

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.