TypeScript Types for new JavaScript
This repository contains TypeScript type declarations for a lot of new JavaScript stuff that isn't yet in TypeScript's standard type declarations (see below for the complete list). These range from the File System Access API over Shared Element Transitions to Houdini CSS Typed OM or Handwriting Recognition. Some specifications have only partially been integrated into TypeScript's standard type declarations, in which case this repository contains only the parts of the specifications that aren't there (yet). For most specifications I have used WebIDL2TS, a tool that automatically converts WebIDL to TypeScript type declarations, and manually edited the stuff where it didn't generate the desired result.
NPM: new-javascript
GitHub: BenjaminAster/TypeScript-types-for-new-JavaScript
Install using npm:
npm i -D new-javscript
Reference the type definitions directly in your TypeScript/JavaScript files...
/// <reference types="new-javascript" />
...or include them in your tsconfig.json
or jsconfig.json
:
{
"compilerOptions": {
"types": ["new-javascript"],
},
}
Specifications in this repository
The type declarations in this repository include the following specifications (grouped by venue):
-
WICG:
- Background Fetch
- Background Sync
- Compression Streams
- EyeDropper API
- File System Access API
- Handwriting Recognition API
- Local Font Access API
- Manifest Incubations (this includes the BeforeInstallPromptEvent and File Handling)
- Navigation API
- Periodic Background Sync
- Sanitizer API
- Shape Detection API
- Shared Element Transitions
- User-Agent Client Hints
- URLPattern API
- Window Controls Overlay
- CSS-TAG Houdini:
- CSSWG:
- W3C:
- WHATWG:
- Web Bluetooth CG:
- TC39: