refactor: add types (#9288)
This commit is contained in:
@ -6,7 +6,7 @@ var win = typeof window !== 'undefined' && window || <any>{};
|
||||
export {win as window};
|
||||
export var document = win.document;
|
||||
export var location = win.location;
|
||||
export var gc = win['gc'] ? () => win['gc']() : (): any /** TODO #9100 */ => null;
|
||||
export var gc = win['gc'] ? () => win['gc']() : (): any => null;
|
||||
export var performance = win['performance'] ? win['performance'] : null;
|
||||
export const Event = win['Event'];
|
||||
export const MouseEvent = win['MouseEvent'];
|
||||
|
@ -127,13 +127,13 @@ function hour12Modify(
|
||||
}
|
||||
|
||||
function digitCondition(prop: string, len: number): Intl.DateTimeFormatOptions {
|
||||
var result = {};
|
||||
(result as any /** TODO #9100 */)[prop] = len == 2 ? '2-digit' : 'numeric';
|
||||
var result: {[k: string]: string} = {};
|
||||
result[prop] = len == 2 ? '2-digit' : 'numeric';
|
||||
return result;
|
||||
}
|
||||
function nameCondition(prop: string, len: number): Intl.DateTimeFormatOptions {
|
||||
var result = {};
|
||||
(result as any /** TODO #9100 */)[prop] = len < 4 ? 'short' : 'long';
|
||||
var result: {[k: string]: string} = {};
|
||||
result[prop] = len < 4 ? 'short' : 'long';
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user