diff --git a/uni_modules/uts-tests/utssdk/Type.uts b/uni_modules/uts-tests/utssdk/Type.uts index 1f521ea6cc3e436d3ed73edfc4d981f6d78a2558..77ee22d201494d10b9d37537d5ecfceb19df386c 100644 --- a/uni_modules/uts-tests/utssdk/Type.uts +++ b/uni_modules/uts-tests/utssdk/Type.uts @@ -13,6 +13,23 @@ export function testType() : Result { age: 2 } as Person + expect(a instanceof Person).toEqual(true); + expect(b instanceof Person).toEqual(true); + }) + test("Type with any[]", () => { + type Person = { + age: number, + friends: any[] + } + const a: Person = { + age: 1, + friends: ['b'] + } + const b = { + age: 2, + friends: ['a'] + } as Person + expect(a instanceof Person).toEqual(true); expect(b instanceof Person).toEqual(true); })