-
-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make declarations work without ts proxy lib #718
- Loading branch information
Showing
7 changed files
with
206 additions
and
194 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { | ||
ProxyTypeProxyArray, | ||
ImmerState, | ||
ProxyTypeProxyObject, | ||
AnyArray, | ||
Drafted, | ||
AnyObject, | ||
ImmerBaseState | ||
} from "../internal" | ||
|
||
export type ProxyState = ProxyObjectState | ProxyArrayState | ||
|
||
export interface ProxyBaseState extends ImmerBaseState { | ||
assigned_: { | ||
[property: string]: boolean | ||
} | ||
parent_?: ImmerState | ||
revoke_(): void | ||
} | ||
|
||
export interface ProxyObjectState extends ProxyBaseState { | ||
type_: typeof ProxyTypeProxyObject | ||
base_: any | ||
copy_: any | ||
draft_: Drafted<AnyObject, ProxyObjectState> | ||
} | ||
|
||
export interface ProxyArrayState extends ProxyBaseState { | ||
type_: typeof ProxyTypeProxyArray | ||
base_: AnyArray | ||
copy_: AnyArray | null | ||
draft_: Drafted<AnyArray, ProxyArrayState> | ||
} |
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.