UNPKG

@loopback/docs

Version:
1,627 lines (1,626 loc) 604 kB
{ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "7.3.8", "schemaVersion": 1003, "oldestForwardsCompatibleVersion": 1001 }, "kind": "Package", "canonicalReference": "@loopback/context!", "docComment": "", "name": "@loopback/context", "members": [ { "kind": "EntryPoint", "canonicalReference": "@loopback/context!", "name": "", "members": [ { "kind": "Function", "canonicalReference": "@loopback/context!asBindingTemplate:function(1)", "docComment": "/**\n * Convert binding scope and tags as a template function\n *\n * @param scopeAndTags - Binding scope and tags\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "asBindingTemplate" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "scopeAndTags" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingScopeAndTags" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "BindingTemplate" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 7, "endIndex": 8 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "scopeAndTags", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "asBindingTemplate" }, { "kind": "Function", "canonicalReference": "@loopback/context!asClassOrProvider:function(1)", "docComment": "/**\n * A factory function to create a template function to bind the target class as a class or `Provider`.\n *\n * @param target - Target class, which can be an implementation of `Provider`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "asClassOrProvider" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "target" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Constructor" }, { "kind": "Content", "text": "<unknown>" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "BindingTemplate" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 8, "endIndex": 9 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "target", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 7 } } ], "name": "asClassOrProvider" }, { "kind": "Function", "canonicalReference": "@loopback/context!asGlobalInterceptor:function(1)", "docComment": "/**\n * The `BindingTemplate` function to configure a binding as a global interceptor by tagging it with `ContextTags.INTERCEPTOR`\n *\n * @param group - Group for ordering the interceptor\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "asGlobalInterceptor" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "group" }, { "kind": "Content", "text": "?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "BindingTemplate" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 7, "endIndex": 8 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "group", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "asGlobalInterceptor" }, { "kind": "TypeAlias", "canonicalReference": "@loopback/context!AsInterceptedFunction:type", "docComment": "/**\n * The intercepted variant of a function to return `ValueOrPromise<T>`. If `T` is not a function, the type is `T`.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare type " }, { "kind": "Reference", "text": "AsInterceptedFunction" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": "> = " }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " extends (..." }, { "kind": "Reference", "text": "args" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "InvocationArgs" }, { "kind": "Content", "text": ") => infer " }, { "kind": "Reference", "text": "R" }, { "kind": "Content", "text": " ? (..." }, { "kind": "Reference", "text": "args" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "InvocationArgs" }, { "kind": "Content", "text": ") => " }, { "kind": "Reference", "text": "AsValueOrPromise" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "R" }, { "kind": "Content", "text": "> : " }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "AsInterceptedFunction", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } } ], "typeTokenRange": { "startIndex": 5, "endIndex": 22 } }, { "kind": "Function", "canonicalReference": "@loopback/context!asProvider:function(1)", "docComment": "/**\n * A factory function to create a template function to bind the target class as a `Provider`.\n *\n * @param target - Target provider class\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "asProvider" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "target" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Constructor" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Provider" }, { "kind": "Content", "text": "<unknown>>" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "BindingTemplate" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 10, "endIndex": 11 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "target", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 9 } } ], "name": "asProvider" }, { "kind": "Function", "canonicalReference": "@loopback/context!asResolutionOptions:function(1)", "docComment": "/**\n * Normalize ResolutionOptionsOrSession to ResolutionOptions\n *\n * @param optionsOrSession - resolution options or session\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "asResolutionOptions" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "optionsOrSession" }, { "kind": "Content", "text": "?: " }, { "kind": "Reference", "text": "ResolutionOptionsOrSession" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "ResolutionOptions" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 7, "endIndex": 8 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "optionsOrSession", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "asResolutionOptions" }, { "kind": "Function", "canonicalReference": "@loopback/context!assertTargetType:function(1)", "docComment": "/**\n * Assert the target type inspected from TypeScript for injection to be the expected type. If the types don't match, an error is thrown.\n *\n * @param injection - Injection information\n *\n * @param expectedType - Expected type\n *\n * @param expectedTypeName - Name of the expected type to be used in the error\n *\n * @returns The name of the target\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "assertTargetType" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "injection" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Readonly" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Injection" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "expectedType" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Function" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "expectedTypeName" }, { "kind": "Content", "text": "?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "string | undefined" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 18, "endIndex": 19 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "injection", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 9 } }, { "parameterName": "expectedType", "parameterTypeTokenRange": { "startIndex": 12, "endIndex": 13 } }, { "parameterName": "expectedTypeName", "parameterTypeTokenRange": { "startIndex": 16, "endIndex": 17 } } ], "name": "assertTargetType" }, { "kind": "TypeAlias", "canonicalReference": "@loopback/context!AsValueOrPromise:type", "docComment": "/**\n * Create the Promise type for `T`. If `T` extends `Promise`, the type is `T`, otherwise the type is `ValueOrPromise<T>`.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare type " }, { "kind": "Reference", "text": "AsValueOrPromise" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": "> = " }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " extends " }, { "kind": "Reference", "text": "Promise" }, { "kind": "Content", "text": "<unknown> ? " }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " : " }, { "kind": "Reference", "text": "ValueOrPromise" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "AsValueOrPromise", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } } ], "typeTokenRange": { "startIndex": 5, "endIndex": 15 } }, { "kind": "TypeAlias", "canonicalReference": "@loopback/context!AsyncProxy:type", "docComment": "/**\n * The proxy type for `T`. The return type for any method of `T` with original return type `R` becomes `ValueOrPromise<R>` if `R` does not extend `Promise`. Property types stay untouched.\n *\n * @example\n * ```ts\n * class MyController {\n * name: string;\n *\n * greet(name: string): string {\n * return `Hello, ${name}`;\n * }\n *\n * async hello(name: string) {\n * return `Hello, ${name}`;\n * }\n * }\n * ```\n *\n * `AsyncProxy<MyController>` will be:\n * ```ts\n * {\n * name: string; // the same as MyController\n * greet(name: string): ValueOrPromise<string>; // the return type becomes `ValueOrPromise<string>`\n * hello(name: string): Promise<string>; // the same as MyController\n * }\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare type " }, { "kind": "Reference", "text": "AsyncProxy" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": "> = " }, { "kind": "Content", "text": "{\n [" }, { "kind": "Reference", "text": "P" }, { "kind": "Content", "text": " in keyof " }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": "]: " }, { "kind": "Reference", "text": "AsInterceptedFunction" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": "[" }, { "kind": "Reference", "text": "P" }, { "kind": "Content", "text": "]>;\n}" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "AsyncProxy", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 0, "endIndex": 0 } } ], "typeTokenRange": { "startIndex": 5, "endIndex": 16 } }, { "kind": "Function", "canonicalReference": "@loopback/context!bind:function(1)", "docComment": "/**\n * Decorate a class with binding configuration\n *\n * @param specs - A list of binding scope/tags or template functions to configure the binding\n *\n * @example\n * ```ts\n * @bind((binding) => {binding.inScope(BindingScope.SINGLETON).tag('controller')}\n * )\n * export class MyController {\n * }\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare function " }, { "kind": "Reference", "text": "bind" }, { "kind": "Content", "text": "(..." }, { "kind": "Reference", "text": "specs" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingSpec" }, { "kind": "Content", "text": "[]" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "ClassDecorator" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 8, "endIndex": 9 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "specs", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 7 } } ], "name": "bind" }, { "kind": "Namespace", "canonicalReference": "@loopback/context!bind:namespace", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export declare namespace " }, { "kind": "Reference", "text": "bind" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "bind", "members": [ { "kind": "Function", "canonicalReference": "@loopback/context!bind.provider:function(1)", "docComment": "/**\n * `@bind.provider` to denote a provider class\n *\n * A list of binding scope/tags or template functions to configure the binding\n */\n", "excerptTokens": [ { "kind": "Content", "text": "function " }, { "kind": "Reference", "text": "provider" }, { "kind": "Content", "text": "(..." }, { "kind": "Reference", "text": "specs" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingSpec" }, { "kind": "Content", "text": "[]" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "target" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Constructor" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Provider" }, { "kind": "Content", "text": "<unknown>>) => void" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 8, "endIndex": 15 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "specs", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 7 } } ], "name": "provider" } ] }, { "kind": "Variable", "canonicalReference": "@loopback/context!BINDING_METADATA_KEY:var", "docComment": "/**\n * Metadata key for binding metadata\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "BINDING_METADATA_KEY" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "MetadataAccessor" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "BindingMetadata" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "ClassDecorator" }, { "kind": "Content", "text": ">" } ], "releaseTag": "Public", "name": "BINDING_METADATA_KEY", "variableTypeTokenRange": { "startIndex": 2, "endIndex": 8 } }, { "kind": "Class", "canonicalReference": "@loopback/context!Binding:class", "docComment": "/**\n * Binding represents an entry in the `Context`. Each binding has a key and a corresponding value getter.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare class " }, { "kind": "Reference", "text": "Binding" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " = " }, { "kind": "Reference", "text": "BoundValue" }, { "kind": "Content", "text": "> " } ], "releaseTag": "Public", "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "Binding", "members": [ { "kind": "Constructor", "canonicalReference": "@loopback/context!Binding:constructor(1)", "docComment": "/**\n * Constructs a new instance of the `Binding` class\n */\n", "excerptTokens": [ { "kind": "Content", "text": "constructor(" }, { "kind": "Reference", "text": "key" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingAddress" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "isLocked" }, { "kind": "Content", "text": "?: " }, { "kind": "Content", "text": "boolean" }, { "kind": "Content", "text": ");" } ], "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "key", "parameterTypeTokenRange": { "startIndex": 3, "endIndex": 7 } }, { "parameterName": "isLocked", "parameterTypeTokenRange": { "startIndex": 10, "endIndex": 11 } } ] }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding#apply:member(1)", "docComment": "/**\n * Apply one or more template functions to set up the binding with scope, tags, and other attributes as a group.\n *\n * @param templateFns - One or more functions to configure the binding\n *\n * @example\n * ```ts\n * const serverTemplate = (binding: Binding) =>\n * binding.inScope(BindingScope.SINGLETON).tag('server');\n *\n * const serverBinding = new Binding<RestServer>('servers.RestServer1');\n * serverBinding.apply(serverTemplate);\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "apply" }, { "kind": "Content", "text": "(..." }, { "kind": "Reference", "text": "templateFns" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingTemplate" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">[]" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "this" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 9, "endIndex": 10 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "templateFns", "parameterTypeTokenRange": { "startIndex": 4, "endIndex": 8 } } ], "name": "apply" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding#applyDefaultScope:member(1)", "docComment": "/**\n * Apply default scope to the binding. It only changes the scope if it's not set yet\n *\n * @param scope - Default binding scope\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "applyDefaultScope" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "scope" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingScope" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "this" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 6, "endIndex": 7 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "scope", "parameterTypeTokenRange": { "startIndex": 4, "endIndex": 5 } } ], "name": "applyDefaultScope" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding.bind:member(1)", "docComment": "/**\n * A static method to create a binding so that we can do `Binding.bind('foo').to('bar');` as `new Binding('foo').to('bar')` is not easy to read.\n *\n * @param key - Binding key\n */\n", "excerptTokens": [ { "kind": "Content", "text": "static " }, { "kind": "Reference", "text": "bind" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " = " }, { "kind": "Content", "text": "unknown" }, { "kind": "Content", "text": ">(" }, { "kind": "Reference", "text": "key" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingAddress" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "Binding" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "isStatic": true, "returnTypeTokenRange": { "startIndex": 14, "endIndex": 18 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "key", "parameterTypeTokenRange": { "startIndex": 9, "endIndex": 13 } } ], "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "bind" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding.configure:member(1)", "docComment": "/**\n * Create a configuration binding for the given key\n *\n * @param key - Key for the binding to be configured\n *\n * @typeParam - T Generic type for the configuration value (not the binding to be configured)\n *\n * @example\n * ```ts\n * const configBinding = Binding.configure('servers.RestServer.server1')\n * .to({port: 3000});\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", "text": "static " }, { "kind": "Reference", "text": "configure" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " = " }, { "kind": "Content", "text": "unknown" }, { "kind": "Content", "text": ">(" }, { "kind": "Reference", "text": "key" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "BindingAddress" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "Binding" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "isStatic": true, "returnTypeTokenRange": { "startIndex": 11, "endIndex": 15 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "key", "parameterTypeTokenRange": { "startIndex": 9, "endIndex": 10 } } ], "typeParameters": [ { "typeParameterName": "T", "constraintTokenRange": { "startIndex": 0, "endIndex": 0 }, "defaultTypeTokenRange": { "startIndex": 5, "endIndex": 6 } } ], "name": "configure" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding#getValue:member(1)", "docComment": "/**\n * This is an internal function optimized for performance. Users should use `@inject(key)` or `ctx.get(key)` instead.\n *\n * Get the value bound to this key. Depending on `isSync`, this function returns either: - the bound value - a promise of the bound value\n *\n * Consumers wishing to consume sync values directly should use `isPromiseLike` to check the type of the returned value to decide how to handle it.\n *\n * @param ctx - Context for the resolution\n *\n * @param session - Optional session for binding and dependency resolution\n *\n * @example\n * ```\n * const result = binding.getValue(ctx);\n * if (isPromiseLike(result)) {\n * result.then(doSomething)\n * } else {\n * doSomething(result);\n * }\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "getValue" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "ctx" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Context" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "session" }, { "kind": "Content", "text": "?: " }, { "kind": "Reference", "text": "ResolutionSession" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "ValueOrPromise" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 10, "endIndex": 14 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "ctx", "parameterTypeTokenRange": { "startIndex": 4, "endIndex": 5 } }, { "parameterName": "session", "parameterTypeTokenRange": { "startIndex": 8, "endIndex": 9 } } ], "name": "getValue" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding#getValue:member(2)", "docComment": "/**\n * Returns a value or promise for this binding in the given context. The resolved value can be `undefined` if `optional` is set to `true` in `options`.\n *\n * @param ctx - Context for the resolution\n *\n * @param options - Optional options for binding and dependency resolution\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "getValue" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "ctx" }, { "kind": "Content", "text": ": " }, { "kind": "Reference", "text": "Context" }, { "kind": "Content", "text": ", " }, { "kind": "Reference", "text": "options" }, { "kind": "Content", "text": "?: " }, { "kind": "Reference", "text": "ResolutionOptions" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "ValueOrPromise" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "T" }, { "kind": "Content", "text": " | undefined>" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 10, "endIndex": 14 }, "releaseTag": "Public", "overloadIndex": 2, "parameters": [ { "parameterName": "ctx", "parameterTypeTokenRange": { "startIndex": 4, "endIndex": 5 } }, { "parameterName": "options", "parameterTypeTokenRange": { "startIndex": 8, "endIndex": 9 } } ], "name": "getValue" }, { "kind": "Method", "canonicalReference": "@loopback/context!Binding#inScope:member(1)", "docComment": "/**\n * Set the binding scope\n *\n * @param scope - Binding scope\n */\n", "excerptTokens": [ { "kind": "Reference", "text": "inScope" }, { "kind": "Content", "text": "(" }, { "kind": "Reference", "text": "scope" }, {