/* eslint-disable @typescript-eslint/indent */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { basename } from '@waiting/shared-core' import { Equals } from '@waiting/shared-types' import { DbDict } from '../src/index' import { Db, Db2 } from './test3.model' // eslint-disable-next-line import/order import assert = require('power-assert') const filename = basename(__filename) describe(filename, () => { describe('Should DbDict works', () => { type K1 = DbDict type K2 = DbDict // with extra Db2.tb_user.pwd const foo = { } as K1 const foo2 = { } as K2 it('normal', () => { type F1 = K1['tables']['tb_user'] const t11: Equals = true const t12: Equals = false const t13: Equals = false type F2 = typeof foo.tables.tb_user const t21: Equals = true const t22: Equals = false const t23: Equals = false }) }) })