@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
35 lines (22 loc) • 898 B
Markdown
lang: en
title: 'API docs: core.asservice'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.asservice.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/core](./core.md) > [asService](./core.asservice.md)
## asService() function
Create a binding template for a service interface
<b>Signature:</b>
```typescript
export declare function asService(serviceInterface: ServiceInterface): BindingTemplate;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| serviceInterface | [ServiceInterface](./core.serviceinterface.md) | Service interface |
<b>Returns:</b>
[BindingTemplate](./context.bindingtemplate.md)