mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #62168 Added floyd-steinberg types by @tajnymag
* Added floyd-steinberg types * Changed author name to trigger a new CI run
This commit is contained in:
6
types/floyd-steinberg/floyd-steinberg-tests.ts
Normal file
6
types/floyd-steinberg/floyd-steinberg-tests.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import floydSteinberg = require('floyd-steinberg');
|
||||
|
||||
const imageData = new ImageData(new Uint8ClampedArray([]), 1280, 720);
|
||||
|
||||
// $ExpectType ImageData
|
||||
floydSteinberg(imageData);
|
||||
9
types/floyd-steinberg/index.d.ts
vendored
Normal file
9
types/floyd-steinberg/index.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for floyd-steinberg 1.0
|
||||
// Project: https://github.com/noopkat/floyd-steinberg
|
||||
// Definitions by: Marek Lukas <https://github.com/tajnymag>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
type ImageDataSubset = Partial<ImageData> & Pick<ImageData, 'width' | 'height' | 'data'>;
|
||||
|
||||
declare function floyd_steinberg<T extends ImageDataSubset>(image: T): T;
|
||||
export = floyd_steinberg;
|
||||
24
types/floyd-steinberg/tsconfig.json
Normal file
24
types/floyd-steinberg/tsconfig.json
Normal file
@@ -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",
|
||||
"floyd-steinberg-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/floyd-steinberg/tslint.json
Normal file
1
types/floyd-steinberg/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "@definitelytyped/dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user