@loopback/docs
Version:
Documentation for LoopBack 4
1,414 lines • 143 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.6.2",
"schemaVersion": 1003,
"oldestForwardsCompatibleVersion": 1001
},
"kind": "Package",
"canonicalReference": "@loopback/core!",
"docComment": "",
"name": "@loopback/core",
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "@loopback/core!",
"name": "",
"members": [
{
"kind": "Function",
"canonicalReference": "@loopback/core!addExtension:function(1)",
"docComment": "/**\n * Register an extension for the given extension point to the context\n *\n * @param context - Context object\n *\n * @param extensionPointName - Name of the extension point\n *\n * @param extensionClass - Class or a provider for an extension\n *\n * @param options - Options Options for the creation of binding from class\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function addExtension(context: "
},
{
"kind": "Reference",
"text": "Context",
"canonicalReference": "@loopback/context!Context:class"
},
{
"kind": "Content",
"text": ", extensionPointName: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", extensionClass: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<unknown>"
},
{
"kind": "Content",
"text": ", options?: "
},
{
"kind": "Reference",
"text": "BindingFromClassOptions",
"canonicalReference": "@loopback/context!BindingFromClassOptions:type"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<unknown>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 10,
"endIndex": 12
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "context",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "extensionPointName",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
},
{
"parameterName": "extensionClass",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 7
}
},
{
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
}
],
"name": "addExtension"
},
{
"kind": "Class",
"canonicalReference": "@loopback/core!Application:class",
"docComment": "/**\n * Application is the container for various types of artifacts, such as components, servers, controllers, repositories, datasources, connectors, and models.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class Application extends "
},
{
"kind": "Reference",
"text": "Context",
"canonicalReference": "@loopback/context!Context:class"
},
{
"kind": "Content",
"text": " "
},
{
"kind": "Content",
"text": "implements "
},
{
"kind": "Reference",
"text": "LifeCycleObserver",
"canonicalReference": "@loopback/core!LifeCycleObserver:interface"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "Application",
"members": [
{
"kind": "Constructor",
"canonicalReference": "@loopback/core!Application:constructor(1)",
"docComment": "/**\n * Create an application with the given parent context\n *\n * @param parent - Parent context\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor(parent: "
},
{
"kind": "Reference",
"text": "Context",
"canonicalReference": "@loopback/context!Context:class"
},
{
"kind": "Content",
"text": ");"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "parent",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
},
{
"kind": "Constructor",
"canonicalReference": "@loopback/core!Application:constructor(2)",
"docComment": "/**\n * Create an application with the given configuration and parent context\n *\n * @param config - Application configuration\n *\n * @param parent - Parent context\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor(config?: "
},
{
"kind": "Reference",
"text": "ApplicationConfig",
"canonicalReference": "@loopback/core!ApplicationConfig:interface"
},
{
"kind": "Content",
"text": ", parent?: "
},
{
"kind": "Reference",
"text": "Context",
"canonicalReference": "@loopback/context!Context:class"
},
{
"kind": "Content",
"text": ");"
}
],
"releaseTag": "Public",
"overloadIndex": 2,
"parameters": [
{
"parameterName": "config",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "parent",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
]
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#component:member(1)",
"docComment": "/**\n * Add a component to this application and register extensions such as controllers, providers, and servers from the component.\n *\n * @param componentCtor - The component class to add.\n *\n * @param name - Optional component name, default to the class name\n *\n * @example\n * ```ts\n *\n * export class ProductComponent {\n * controllers = [ProductController];\n * repositories = [ProductRepo, UserRepo];\n * providers = {\n * [AUTHENTICATION_STRATEGY]: AuthStrategy,\n * [AUTHORIZATION_ROLE]: Role,\n * };\n * };\n *\n * app.component(ProductComponent);\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "component(componentCtor: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Component",
"canonicalReference": "@loopback/core!Component:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ", name?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Component",
"canonicalReference": "@loopback/core!Component:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 8,
"endIndex": 12
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "componentCtor",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 5
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
}
}
],
"name": "component"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#controller:member(1)",
"docComment": "/**\n * Register a controller class with this application.\n *\n * @param controllerCtor - The controller class (constructor function).\n *\n * @param name - Optional controller name, default to the class name\n *\n * @returns The newly created binding, you can use the reference to further modify the binding, e.g. lock the value to prevent further modifications.\n *\n * @example\n * ```ts\n * class MyController {\n * }\n * app.controller(MyController).lock();\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "controller(controllerCtor: "
},
{
"kind": "Reference",
"text": "ControllerClass",
"canonicalReference": "@loopback/core!ControllerClass:type"
},
{
"kind": "Content",
"text": ", name?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "controllerCtor",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"name": "controller"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#getServer:member(1)",
"docComment": "/**\n * Retrieve the singleton instance for a bound server.\n *\n * @param ctor - The constructor that was used to make the binding.\n *\n * @typeParam T - Server type\n *\n * @returns A Promise of server instance\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "getServer<T extends "
},
{
"kind": "Reference",
"text": "Server",
"canonicalReference": "@loopback/core!Server:interface"
},
{
"kind": "Content",
"text": ">(target: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<T> | string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "target",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "getServer"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#lifeCycleObserver:member(1)",
"docComment": "/**\n * Register a life cycle observer class\n *\n * @param ctor - A class implements LifeCycleObserver\n *\n * @param name - Optional name for the life cycle observer\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "lifeCycleObserver<T extends "
},
{
"kind": "Reference",
"text": "LifeCycleObserver",
"canonicalReference": "@loopback/core!LifeCycleObserver:interface"
},
{
"kind": "Content",
"text": ">(ctor: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ", name?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 8,
"endIndex": 10
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "ctor",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "lifeCycleObserver"
},
{
"kind": "Property",
"canonicalReference": "@loopback/core!Application#options:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "readonly options: "
},
{
"kind": "Reference",
"text": "ApplicationConfig",
"canonicalReference": "@loopback/core!ApplicationConfig:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "options",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isStatic": false
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#server:member(1)",
"docComment": "/**\n * Bind a Server constructor to the Application's master context. Each server constructor added in this way must provide a unique prefix to prevent binding overlap.\n *\n * @param server - The server constructor.\n *\n * @param name - Optional override for key name.\n *\n * @returns Binding for the server class\n *\n * @example\n * ```ts\n * app.server(RestServer);\n * // This server constructor will be bound under \"servers.RestServer\".\n * app.server(RestServer, \"v1API\");\n * // This server instance will be bound under \"servers.v1API\".\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "server<T extends "
},
{
"kind": "Reference",
"text": "Server",
"canonicalReference": "@loopback/core!Server:interface"
},
{
"kind": "Content",
"text": ">(ctor: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ", name?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 8,
"endIndex": 10
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "ctor",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "server"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#servers:member(1)",
"docComment": "/**\n * Bind an array of Server constructors to the Application's master context. Each server added in this way will automatically be named based on the class constructor name with the \"servers.\" prefix.\n *\n * @remarks\n *\n * If you wish to control the binding keys for particular server instances, use the app.server function instead.\n * ```ts\n * app.servers([\n * RestServer,\n * GRPCServer,\n * ]);\n * // Creates a binding for \"servers.RestServer\" and a binding for\n * // \"servers.GRPCServer\";\n * ```\n *\n * @param ctors - An array of Server constructors.\n *\n * @returns An array of bindings for the registered server classes\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "servers<T extends "
},
{
"kind": "Reference",
"text": "Server",
"canonicalReference": "@loopback/core!Server:interface"
},
{
"kind": "Content",
"text": ">(ctors: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<T>[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "[]"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "ctors",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "servers"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#service:member(1)",
"docComment": "/**\n * Add a service to this application.\n *\n * @param cls - The service or provider class\n *\n * @example\n * ```ts\n * // Define a class to be bound via ctx.toClass()\n * @bind({scope: BindingScope.SINGLETON})\n * export class LogService {\n * log(msg: string) {\n * console.log(msg);\n * }\n * }\n *\n * // Define a class to be bound via ctx.toProvider()\n * const uuidv4 = require('uuid/v4');\n * export class UuidProvider implements Provider<string> {\n * value() {\n * return uuidv4();\n * }\n * }\n *\n * // Register the local services\n * app.service(LogService);\n * app.service(UuidProvider, 'uuid');\n *\n * export class MyController {\n * constructor(\n * @inject('services.uuid') private uuid: string,\n * @inject('services.LogService') private log: LogService,\n * ) {\n * }\n *\n * greet(name: string) {\n * this.log(`Greet request ${this.uuid} received: ${name}`);\n * return `${this.uuid}: ${name}`;\n * }\n * }\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "service<S>(cls: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<S> | "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Provider",
"canonicalReference": "@loopback/context!Provider:interface"
},
{
"kind": "Content",
"text": "<S>>"
},
{
"kind": "Content",
"text": ", name?: "
},
{
"kind": "Content",
"text": "string | "
},
{
"kind": "Reference",
"text": "ServiceOptions",
"canonicalReference": "@loopback/core!ServiceOptions:type"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<S>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 11,
"endIndex": 13
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "cls",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 7
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 10
}
}
],
"typeParameters": [
{
"typeParameterName": "S",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "service"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#setMetadata:member(1)",
"docComment": "/**\n * Set application metadata. `@loopback/boot` calls this method to populate the metadata from `package.json`.\n *\n * @param metadata - Application metadata\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "setMetadata(metadata: "
},
{
"kind": "Reference",
"text": "ApplicationMetadata",
"canonicalReference": "@loopback/core!ApplicationMetadata:interface"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "void"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "metadata",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "setMetadata"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#start:member(1)",
"docComment": "/**\n * Start the application, and all of its registered observers.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "start(): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<void>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "start"
},
{
"kind": "Method",
"canonicalReference": "@loopback/core!Application#stop:member(1)",
"docComment": "/**\n * Stop the application instance and all of its registered observers.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "stop(): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<void>"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "stop"
}
],
"extendsTokenRange": {
"startIndex": 1,
"endIndex": 3
},
"implementsTokenRanges": [
{
"startIndex": 4,
"endIndex": 6
}
]
},
{
"kind": "Interface",
"canonicalReference": "@loopback/core!ApplicationConfig:interface",
"docComment": "/**\n * Configuration for application\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface ApplicationConfig "
}
],
"releaseTag": "Public",
"name": "ApplicationConfig",
"members": [
{
"kind": "IndexSignature",
"canonicalReference": "@loopback/core!ApplicationConfig:index(1)",
"docComment": "/**\n * Other properties\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "[prop: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "]: "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "prop",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "@loopback/core!ApplicationMetadata:interface",
"docComment": "/**\n * Type description for `package.json`\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface ApplicationMetadata extends "
},
{
"kind": "Reference",
"text": "JSONObject",
"canonicalReference": "@loopback/core!JSONObject:interface"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "ApplicationMetadata",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/core!ApplicationMetadata#description:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "description: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "description",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/core!ApplicationMetadata#name:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "name",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/core!ApplicationMetadata#version:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "version: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "version",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": [
{
"startIndex": 1,
"endIndex": 3
}
]
},
{
"kind": "Function",
"canonicalReference": "@loopback/core!asLifeCycleObserver:function(1)",
"docComment": "/**\n * A `BindingTemplate` function to configure the binding as life cycle observer by tagging it with `CoreTags.LIFE_CYCLE_OBSERVER`.\n *\n * @param binding - Binding object\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function asLifeCycleObserver<T = "
},
{
"kind": "Content",
"text": "unknown"
},
{
"kind": "Content",
"text": ">(binding: "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "binding",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 5
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "asLifeCycleObserver"
},
{
"kind": "Function",
"canonicalReference": "@loopback/core!asService:function(1)",
"docComment": "/**\n * Create a binding template for a service interface\n *\n * @param serviceInterface - Service interface\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function asService(serviceInterface: "
},
{
"kind": "Reference",
"text": "ServiceInterface",
"canonicalReference": "@loopback/core!ServiceInterface:type"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "BindingTemplate",
"canonicalReference": "@loopback/context!BindingTemplate:type"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "serviceInterface",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "asService"
},
{
"kind": "Interface",
"canonicalReference": "@loopback/core!ClassMap:interface",
"docComment": "/**\n * A map of classes to be bound to a context\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface ClassMap "
}
],
"releaseTag": "Public",
"name": "ClassMap",
"members": [
{
"kind": "IndexSignature",
"canonicalReference": "@loopback/core!ClassMap:index(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "[key: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "]: "
},
{
"kind": "Reference",
"text": "Constructor",
"canonicalReference": "@loopback/context!Constructor:type"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "BoundValue",
"canonicalReference": "@loopback/context!BoundValue:type"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "key",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "@loopback/core!Component:interface",
"docComment": "/**\n * A component declares a set of artifacts so that they cane be contributed to an application as a group\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface Component "
}
],
"releaseTag": "Public",
"name": "Component",
"members": [
{
"kind": "IndexSignature",
"canonicalReference": "@loopback/core!Component:index(1)",
"docComment": "/**\n * Other properties\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "[prop: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "]: "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "prop",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/core!Component#bindings:member",
"docComment": "/**\n * An array of bindings to be aded to the application context.\n *\n * @example\n * ```ts\n * const bindingX = Binding.bind('x').to('Value X');\n * this.bindings = [bindingX]\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "bindings?: "
},
{
"kind": "Reference",
"text": "Binding",
"canonicalReference": "@loopback/context!Binding:class"
},
{
"kind": "Content",
"text": "[]"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "bindings",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/core!Component#classes:member",
"docComment": "/**\n * A map of classes to be bound to the application context.\n *\n * @example\n * ```ts\n * {\n * 'rest.body-parsers.xml': XmlBodyParser\n * }\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"