Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions types/shimmer/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
declare global {
interface Function {
__wrapped?: boolean | undefined;
}
}

declare const shimmer: {
(options: { logger?(msg: string): void }): void;
wrap<Nodule extends object, FieldName extends keyof Nodule>(
Expand Down
2 changes: 1 addition & 1 deletion types/shimmer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/shimmer",
"version": "1.0.9999",
"version": "1.2.9999",
"projects": [
"https://github.com/othiym23/shimmer"
],
Expand Down
9 changes: 9 additions & 0 deletions types/shimmer/shimmer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ shimmer.massWrap([fish, turtle], ["age"], (originalAge) => {
shimmer.unwrap(fish, "name");

shimmer.massUnwrap([fish, turtle], ["age"]);

// The following may look weird and unrelated to the package but shimmer had a global type definition that broke the following code:
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/69966
function randomFunction() {}
// eslint-disable-next-line @typescript-eslint/ban-types
function randomFunctionThatTakesFunction(f: Required<Function>) {
return f;
}
randomFunctionThatTakesFunction(randomFunction);