🤖 Merge PR #60972 [array-equal] Add types for array-equal by @MysteryBlokHed

This commit is contained in:
Adam Thompson-Sharpe
2022-06-26 11:20:04 -04:00
committed by GitHub
parent 843240886b
commit 9373c787db
4 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import equal = require('array-equal');
// @ts-expect-error
equal();
// @ts-expect-error
equal([]);
equal([1, 2, 3], [1, 2, 3]);

8
types/array-equal/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for array-equal 1.0
// Project: https://github.com/component/array-equal
// Definitions by: Adam Thompson-Sharpe <https://github.com/MysteryBlokHed>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function equal(arr1: readonly any[], arr2: readonly any[]): boolean;
export = equal;

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "array-equal-tests.ts"]
}

View File

@@ -0,0 +1 @@
{ "extends": "@definitelytyped/dtslint/dt.json" }