-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Motivation removes all instances of lazy typing (`any`)
- Loading branch information
Showing
14 changed files
with
300 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import "@testing-library/jest-dom"; | ||
// Define an interface for the mock if TypeScript doesn't include CSS or is missing properties/methods you need | ||
interface CSSMock { | ||
escape: (input: string) => string; | ||
} | ||
|
||
// Assigning the mock to global.CSS with proper typing | ||
if (typeof CSS === "undefined") { | ||
global.CSS = { | ||
const mockCSS: CSSMock = { | ||
escape: (string_: string) => string_.replaceAll(/([()\\{}])/g, "\\$1"), | ||
} as any; // Cast to 'any' to bypass TypeScript's type checking for the mock. | ||
}; | ||
|
||
// Extend the existing global interface (if necessary) and assign the mock | ||
global.CSS = mockCSS as typeof CSS; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.