Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LightAPIs/arrive-type

Repository files navigation

arrive-type

generic type library of arrive package.

Installation

npm install arrive
npm install @dragonish/arrive-type -D

Configuration

Add to the tsconfig.json file:

{
 "compilerOptions": {
 "typeRoots": [
 "./node_modules/@types",
 "./node_modules/@dragonish"
 ]
 }
}

Usage

document.arrive<HTMLImageElement>('img', img => {
 const src = img.src;
 // ...
});

Async/await and promise support:

const img = await document.arrive<HTMLImageElement>('img');
const src = img.src;
// ...

Credits

License

MIT

About

A generic version of @types/arrive.

Topics

Resources

License

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /