mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 08:57:26 +08:00
jasmine-enzyme: Convert to external module (#20047)
This commit is contained in:
51
types/jasmine-enzyme/index.d.ts
vendored
51
types/jasmine-enzyme/index.d.ts
vendored
@@ -7,32 +7,29 @@
|
||||
/// <reference types="jasmine" />
|
||||
/// <reference types="react" />
|
||||
|
||||
declare namespace jasmine {
|
||||
interface Matchers<T> {
|
||||
toBeChecked(): boolean;
|
||||
toBeDisabled(): boolean;
|
||||
toBeEmpty(): boolean;
|
||||
toBePresent(): boolean;
|
||||
toContainReact(reactInstance: JSX.Element): boolean;
|
||||
toHaveClassName(className: string): boolean;
|
||||
toHaveHTML(html: string): boolean;
|
||||
toHaveProp(propKey: string, propValue?: any): boolean;
|
||||
toHaveRef(refName: string): string;
|
||||
toHaveState(stateKey: string, stateValue?: any): boolean;
|
||||
toHaveStyle(styleKey: string, styleValue?: any): boolean;
|
||||
toHaveTagName(tagName: string): boolean;
|
||||
toHaveText(text?: string): boolean;
|
||||
toIncludeText(text: string): boolean;
|
||||
toHaveValue(value: any): boolean;
|
||||
toMatchElement(reactInstance: JSX.Element): boolean;
|
||||
toMatchSelector(selector: string): boolean;
|
||||
declare function jasmineEnzyme(): void;
|
||||
export default jasmineEnzyme;
|
||||
|
||||
declare global {
|
||||
namespace jasmine {
|
||||
interface Matchers<T> {
|
||||
toBeChecked(): boolean;
|
||||
toBeDisabled(): boolean;
|
||||
toBeEmpty(): boolean;
|
||||
toBePresent(): boolean;
|
||||
toContainReact(reactInstance: JSX.Element): boolean;
|
||||
toHaveClassName(className: string): boolean;
|
||||
toHaveHTML(html: string): boolean;
|
||||
toHaveProp(propKey: string, propValue?: any): boolean;
|
||||
toHaveRef(refName: string): string;
|
||||
toHaveState(stateKey: string, stateValue?: any): boolean;
|
||||
toHaveStyle(styleKey: string, styleValue?: any): boolean;
|
||||
toHaveTagName(tagName: string): boolean;
|
||||
toHaveText(text?: string): boolean;
|
||||
toIncludeText(text: string): boolean;
|
||||
toHaveValue(value: any): boolean;
|
||||
toMatchElement(reactInstance: JSX.Element): boolean;
|
||||
toMatchSelector(selector: string): boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare module "jasmine-enzyme" {
|
||||
function jasmineEnzyme(): void;
|
||||
|
||||
module jasmineEnzyme {
|
||||
}
|
||||
export default jasmineEnzyme;
|
||||
}
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// The below rules cause issues and I'm not sure how to fix them. Turning them off for now
|
||||
"no-internal-module": false,
|
||||
"no-single-declare-module": false
|
||||
}
|
||||
}
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
|
||||
Reference in New Issue
Block a user