Add some type annotations
This commit is contained in:
parent
383e20acbd
commit
a724543dac
|
|
@ -17,7 +17,7 @@ window.blessing = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Headers extends Map {
|
class Headers extends Map {
|
||||||
constructor(headers = {}) {
|
constructor(headers: object = {}) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
super(Object.entries(headers))
|
super(Object.entries(headers))
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +46,7 @@ Object.assign(console, {
|
||||||
|
|
||||||
Vue.prototype.$t = key => key
|
Vue.prototype.$t = key => key
|
||||||
|
|
||||||
Vue.directive('t', (el, { value }) => {
|
Vue.directive('t', (el: Element, { value }) => {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
el.innerHTML = value
|
el.innerHTML = value
|
||||||
} else if (typeof value === 'object') {
|
} else if (typeof value === 'object') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user