UNPKG

reactant-module

Version:

A module model for Reactant

25 lines 516 B
import { PropertyDescriptor } from '../interfaces'; /** * ## Description * * `@state` is used to decorate a class property as a state field. * * ## Example * * ```ts * @injectable() * class Counter { * @state * count = 0; * } * * const app = testBed({ * modules: [], * main: Counter, * }); * * expect(app.instance.count).toBe(0); * ``` */ export declare function state(target: object, key: string | symbol, descriptor?: PropertyDescriptor<any>): void; //# sourceMappingURL=state.d.ts.map