UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

67 lines (35 loc) 1.24 kB
--- lang: en title: 'API docs: context.bindingkey.generate' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context permalink: /doc/en/lb4/apidocs.context.bindingkey.generate.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [BindingKey](./context.bindingkey.md) &gt; [generate](./context.bindingkey.generate.md) ## BindingKey.generate() method Generate a universally unique binding key. Please note the format of they generated key is not specified, you must not rely on any specific formatting (e.g. UUID style). **Signature:** ```typescript static generate<T>(namespace?: string): BindingKey<T>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> namespace </td><td markdown="1"> string </td><td markdown="1"> _(Optional)_ Namespace for the binding </td></tr> </tbody></table> **Returns:** [BindingKey](./context.bindingkey.md)<!-- -->&lt;T&gt;