UNPKG

1.39 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2020 Google LLC
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17declare const enum ServiceWorkerStatus {
18 UNKNOWN = 0,
19 UNSUPPORTED = 1,
20 CONTROLLED = 2,
21 UNCONTROLLED = 3
22}
23export declare enum VisibilityState {
24 UNKNOWN = 0,
25 VISIBLE = 1,
26 HIDDEN = 2
27}
28declare const enum EffectiveConnectionType {
29 UNKNOWN = 0,
30 CONNECTION_SLOW_2G = 1,
31 CONNECTION_2G = 2,
32 CONNECTION_3G = 3,
33 CONNECTION_4G = 4
34}
35export declare function getServiceWorkerStatus(): ServiceWorkerStatus;
36export declare function getVisibilityState(): VisibilityState;
37export declare function getEffectiveConnectionType(): EffectiveConnectionType;
38export declare function isValidCustomAttributeName(name: string): boolean;
39export declare function isValidCustomAttributeValue(value: string): boolean;
40export {};