- let b: Boolean = new Boolean(1)
-
- console.log(b)
-
- let n: Number = new Number(true)
-
- console.log(n)
-
- let s: String = new String('cqs')
-
- console.log(s)
-
- let d: Date = new Date()
-
- console.log(d)
-
- let r: RegExp = /^1/
-
- console.log(r)
-
- let e: Error = new Error("error!")
-
- console.log(e)
-
- let xhr: XMLHttpRequest = new XMLHttpRequest();
- 。。。
- //dom Element HTML(元素名称,例如:Div)Element HTMLElement
-
- let div = document.querySelector('div');
-
- let divList: NodeList = document.querySelectorAll('div');
-
- divList.forEach(item => {
-
-
-
- })
let divLists: NodeListOf = document.querySelectorAll('div input')
其他类型。。
- let local: Storage = localStorage
-
- let lo: Location = location
-
- let promise: Promise<string> = new Promise(r => r(''))