跳到主要内容

RxDBRepositoryName

type RxDBRepositoryName =
| keyof RxDBRepositories
| string & object;

Defined in: packages/rxdb/src/rxdb-adapter.ts:914

门面仓储名称

Remarks​

(string & {}) 那一支让未注册类型的门面名照样传得进 @Entity({ repository }), 同时保留 RxDBRepositories 已注册键的自动补全。

类型放宽不代表运行期放宽:名字没经 RxDB.repository() 登记过, EntityManager.init() 仍按 Repository '<name>' not found for entity '<entity>' 抛错。