Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@dragonish/arrive-type

LightAPIs13MIT0.2.1TypeScript support: included

generic type library of arrive package

type, types, arrive

readme

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