Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/tappin/core/mod.ts>ServiceDsl

🦖 Powerful application framework for Deno
Latest
interface ServiceDsl
import { type ServiceDsl } from "https://deno.land/x/tappin@0.5.0/core/mod.ts";

DSL used to create service

Type Parameters

optional
T = any

Methods

inject(...tokens: Array<symbol | string | { token: symbol | string; }>): ServiceDsl<T>

Adds dependencies to this DSL

scope(scope: Scope): ServiceDsl<T>

Sets scope

token(token: string | symbol): ServiceDsl<T>

Sets injection token

provide(f: (...deps: any[]) => Promise<T> | T): ServiceDsl<T>

Sets provider function

build(): Service<T>

Compiles service

set<V>(key: string | symbol, value: V): ServiceDsl<T>

Sets metadata

apply(f: (dsl: ServiceDsl<T>) => ServiceDsl<T>): ServiceDsl<T>

Applies DSL