mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #65898 Add typings for chai-match-pattern by @daedal-knickerbockers
* Add typings for lodash-match-pattern * Add typings for chai-match-pattern --------- Co-authored-by: Daniel Kneip <daniel.kneip@pagnos.com>
This commit is contained in:
8
types/chai-match-pattern/chai-match-pattern-tests.ts
Normal file
8
types/chai-match-pattern/chai-match-pattern-tests.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as chaiMatchPattern from 'chai-match-pattern';
|
||||
chai.use(chaiMatchPattern);
|
||||
|
||||
const _ = chaiMatchPattern.getLodashModule();
|
||||
|
||||
_.isDateString('foo');
|
||||
|
||||
chai.expect({ foo: 'bar' }).to.matchPattern({ foo: 'bar' });
|
||||
23
types/chai-match-pattern/index.d.ts
vendored
Normal file
23
types/chai-match-pattern/index.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// Type definitions for chai-match-pattern 1.3
|
||||
// Project: https://github.com/mjhm/chai-match-pattern#readme
|
||||
// Definitions by: Daniel Kneip <https://github.com/daedal-knickerbockers>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="chai" />
|
||||
|
||||
import * as matchPattern from 'lodash-match-pattern';
|
||||
|
||||
declare global {
|
||||
namespace Chai {
|
||||
interface Assertion {
|
||||
matchPattern(pattern: string | object): Assertion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare const chaiMatchPattern: Chai.ChaiPlugin & {
|
||||
getLodashModule: typeof matchPattern.getLodashModule;
|
||||
use(lodashModule: typeof matchPattern): void;
|
||||
};
|
||||
|
||||
export = chaiMatchPattern;
|
||||
23
types/chai-match-pattern/tsconfig.json
Normal file
23
types/chai-match-pattern/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"chai-match-pattern-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/chai-match-pattern/tslint.json
Normal file
1
types/chai-match-pattern/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "@definitelytyped/dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user