import type { ClassFieldDecorator5, Nilable, ObjectKey } from "../types/internal.js"; /** * Imports a value into a property and sets up a getter for this. * * @example * ``` * import createServer, { IHttp1Request, IHttp1Response } from '@egomobile/http-server' * import { Controller, ControllerBase, GET, Import } from '@egomobile/http-controllers' * * // setup controller and define the * // value keys to import * * @Controller() * export default class MyController extends ControllerBase { * @Import() // s. [1] * public foo!: string * * @Import('currentTime') // s. [2] * public now!: Date * * @GET() * async index(request: IHttp1Request, response: IHttp1Response) { * response.write(this.foo + ': ' + this.now) * } * } * * // setup server with import values ... * * const app = createServer() * * // setup controller * // with import values * app.controllers(__dirname, { * // [1] no function => static value for MyController.foo property * foo: 'bar', * * // [2] function => dynamic value for MyController.now property * currentTime: () => new Date(), * }) * * app.listen() * ``` * * @param {Nilable} [key] The key. Default: The name of the underlying property. * * @returns {ClassFieldDecorator5} The new decorator function. */ export declare function Import(key?: Nilable): ClassFieldDecorator5;