mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
[@types/object-fit-images] added new type definitions (#41742)
* [@types/object-fit-images] added new type definitions * [object-fit-images] set strictNullChecks to true * [object-fit-images] updated type definitions + reverted tsonconfig object-hash
This commit is contained in:
committed by
Ben Lichtman
parent
1dbf1d0293
commit
02a8a9d705
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// Type definitions for object-fit-images 3.2
|
||||
// Project: https://github.com/bfred-it/object-fit-images#readme
|
||||
// Definitions by: Ranjit Singh <https://github.com/rann91>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace objectFillImages;
|
||||
|
||||
export = objectFillImages;
|
||||
|
||||
declare function objectFillImages(
|
||||
images: string | HTMLElement | HTMLElement[] | NodeList | null,
|
||||
options?: { watchMQ?: boolean; skipTest?: boolean },
|
||||
): void;
|
||||
@@ -0,0 +1,6 @@
|
||||
const img = document.createElement('img');
|
||||
img.setAttribute('src', 'https://i.picsum.photos/id/565/536/354.jpg');
|
||||
|
||||
document.appendChild(img);
|
||||
|
||||
objectFillImages(img);
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"object-fit-images-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user