diff --git a/types/jasmine-enzyme/index.d.ts b/types/jasmine-enzyme/index.d.ts index 98fbc5863a..2d07ac3afe 100644 --- a/types/jasmine-enzyme/index.d.ts +++ b/types/jasmine-enzyme/index.d.ts @@ -7,32 +7,29 @@ /// /// -declare namespace jasmine { - interface Matchers { - 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 { + 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; -} diff --git a/types/jasmine-enzyme/tslint.json b/types/jasmine-enzyme/tslint.json index 061da62413..3db14f85ea 100644 --- a/types/jasmine-enzyme/tslint.json +++ b/types/jasmine-enzyme/tslint.json @@ -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" }