A generic version of @types/arrive
.
npm install arrive
npm install @dragonish/arrive-type -D
Add to the tsconfig.json
file:
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./node_modules/@dragonish"
]
}
}
document.arrive<HTMLImageElement>('img', img => {
const src = img.src;
// ...
});