0.0.3 • Published 6 months ago
@types/dom-background-sync v0.0.3
Installation
npm install --save @types/dom-background-sync
Summary
This package contains type definitions for dom-background-sync-browser (https://wicg.github.io/background-sync/spec/#api-description).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-background-sync.
index.d.ts
// Type definitions for non-npm package dom-background-sync-browser 0.0
// Project: https://wicg.github.io/background-sync/spec/#api-description
// Definitions by: Hana Joo <https://github.com/h-joo>
// Jan Kuehle <https://github.com/frigus02>
// Martin Probst <https://github.com/mprobst>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.4
interface SyncEventInit extends ExtendableEventInit {
lastChance?: boolean;
tag: string;
}
// https://wicg.github.io/background-sync/spec/#syncevent
interface SyncEvent extends ExtendableEvent {
readonly lastChance: boolean;
readonly tag: string;
}
declare var SyncEvent: { prototype: SyncEvent; new (type: string, init?: SyncEventInit): SyncEvent };
// https://wicg.github.io/background-sync/spec/#syncmanager
interface SyncManager {
register: (tag: string) => Promise<undefined>;
getTags: () => Promise<string[]>;
}
declare var SyncManager: {
prototype: SyncManager;
new (): SyncManager;
};
interface ServiceWorkerRegistration {
// https://wicg.github.io/background-sync/spec/#dom-serviceworkerregistration-sync
readonly sync: SyncManager;
}
Additional Details
- Last updated: Sat, 13 Nov 2021 17:31:31 GMT
- Dependencies: none
- Global values:
SyncEvent
,SyncManager
Credits
These definitions were written by Hana Joo, Jan Kuehle, and Martin Probst.