提交 e4aa0b50 编写于 作者: 杜庆泉's avatar 杜庆泉

补充部分 typeOf 示例

上级 693e9be0
...@@ -19,10 +19,18 @@ export function testKeyWord(): Result { ...@@ -19,10 +19,18 @@ export function testKeyWord(): Result {
let new1 = new User() let new1 = new User()
expect(typeof(new1)).toEqual('object') expect(typeof(new1)).toEqual('object')
expect(typeof(123456.789)).toEqual('number') expect(typeof(123456.789)).toEqual('number')
expect(typeof(789778979798797987979)).toEqual('number')
expect(typeof(0.0)).toEqual('number')
expect(typeof("hello world")).toEqual('string') expect(typeof("hello world")).toEqual('string')
console.log(typeof([1,2,3])) expect(typeof([1,2,3])).toEqual('object')
let arr1 = new Array<any>() expect(typeof(new Array<any>())).toEqual('object')
console.log(arr1) expect(typeof(new Set<any>())).toEqual('object')
expect(typeof(new Map<any,any>())).toEqual('object')
expect(typeof(new Date())).toEqual('object')
expect(typeof("hello world")).toEqual('string')
// 原生对象
expect(typeof(UTSAndroid.getUniActivity())).toEqual('object')
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册