mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
refactor: replace exported "const enums" with "enums"
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import { getNativeApplication, android as androidApp} from "../application";
|
import { getNativeApplication, android as androidApp} from "../application";
|
||||||
|
|
||||||
export const enum connectionType {
|
export enum connectionType {
|
||||||
none = 0,
|
none = 0,
|
||||||
wifi = 1,
|
wifi = 1,
|
||||||
mobile = 2,
|
mobile = 2,
|
||||||
|
@ -14,7 +14,7 @@ export function getConnectionType(): number;
|
|||||||
/**
|
/**
|
||||||
* Defines the different connection types.
|
* Defines the different connection types.
|
||||||
*/
|
*/
|
||||||
export const enum connectionType {
|
export enum connectionType {
|
||||||
/**
|
/**
|
||||||
* Denotes no connection.
|
* Denotes no connection.
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export const enum connectionType {
|
export enum connectionType {
|
||||||
none = 0,
|
none = 0,
|
||||||
wifi = 1,
|
wifi = 1,
|
||||||
mobile = 2,
|
mobile = 2,
|
||||||
@ -84,4 +84,4 @@ export function stopMonitoring(): void {
|
|||||||
_monitorReachabilityRef = undefined;
|
_monitorReachabilityRef = undefined;
|
||||||
_connectionTypeChangedCallback = undefined;
|
_connectionTypeChangedCallback = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import * as http from "../../http";
|
|||||||
|
|
||||||
import { NetworkAgent } from "../../debugger/debugger";
|
import { NetworkAgent } from "../../debugger/debugger";
|
||||||
|
|
||||||
export const enum HttpResponseEncoding {
|
export enum HttpResponseEncoding {
|
||||||
UTF8,
|
UTF8,
|
||||||
GBK
|
GBK
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import getter = utils.ios.getter;
|
|||||||
|
|
||||||
import * as domainDebugger from "../../debugger/debugger";
|
import * as domainDebugger from "../../debugger/debugger";
|
||||||
|
|
||||||
export const enum HttpResponseEncoding {
|
export enum HttpResponseEncoding {
|
||||||
UTF8,
|
UTF8,
|
||||||
GBK
|
GBK
|
||||||
}
|
}
|
||||||
|
2
tns-core-modules/http/http.d.ts
vendored
2
tns-core-modules/http/http.d.ts
vendored
@ -120,7 +120,7 @@ export interface HttpResponse {
|
|||||||
|
|
||||||
export type Headers = { [key: string]: string | string[] };
|
export type Headers = { [key: string]: string | string[] };
|
||||||
|
|
||||||
export const enum HttpResponseEncoding {
|
export enum HttpResponseEncoding {
|
||||||
UTF8,
|
UTF8,
|
||||||
GBK
|
GBK
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user