Skip to content
Myr

Removed unused stuff

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent 19a6b66 · Browse files · 7 files+5 added−24 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+5 added−24 removed

  • other:+5 added−24 removed

7 files+5 added−24 removed

modified:src/es5.ts-2 removed
6 unmodified lines
7 isDraftable,8 isEnumerable,9 isMap,10 isSet,11 hasSymbol,11 shallowCopy,12 DRAFT_STATE,13 latest14} from "./common"1516import {ImmerScope} from "./scope"17import {ImmerState, Drafted, AnyObject, AnyMap} from "./types"19import {markChanged} from "./proxy"1819// TODO: merge with ImmerState?20interface ES5BaseState {21 scope: ImmerScope
298 unmodified lines
modified:src/immer.ts-1 removed
15 unmodified lines
16 shallowCopy,17 DRAFT_STATE,18 NOTHING,19 freeze,20 latest,20 isPlainObject,21 DRAFTABLE22} from "./common"23import {ImmerScope} from "./scope"
445 unmodified lines
modified:src/map.ts+1 added-3 removed
modified:src/proxy.ts-7 removed
3 unmodified lines
4 each,5 has,6 is,7 isDraftable,8 isDraft,8 isMap,9 isSet,11 hasSymbol,10 shallowCopy,11 DRAFT_STATE,14 assignMap,15 assignSet,16 original,12 latest13} from "./common"14import {ImmerScope} from "./scope"20import {proxyMap} from "./map"21import {proxySet} from "./set"15import {AnyObject, Drafted, ImmerState, AnyArray} from "./types"1617interface ProxyBaseState {18 scope: ImmerScope
228 unmodified lines
modified:src/scope.ts+2 added-2 removed
1import {DRAFT_STATE} from "./common"2import {ImmerState, Patch, PatchListener} from "./types"3import { Immer } from "./immer"2import {Patch, PatchListener} from "./types"3import {Immer} from "./immer"45/** Each scope represents a `produce` call. */6export class ImmerScope {7 static current?: ImmerScope
53 unmodified lines
modified:src/set.ts+2 added-2 removed
1import {isDraftable, DRAFT_STATE, latest} from "./common"1import {DRAFT_STATE, latest} from "./common"23// TODO: kill:4import {assertUnrevoked} from "./es5"4import {ImmerScope} from "./scope"5import {AnySet, Drafted} from "./types"67// TODO: create own states
29 unmodified lines
37const SetBase: SetConstructor =38 typeof Set !== "undefined" ? Set : (function FakeSet() {} as any)3940// TODO: fix types for drafts41// TODO: assert unrevoked42export class DraftSet<K, V> extends SetBase implements Set<V> {43 [DRAFT_STATE]: SetState44 constructor(target, parent) {45 super()
103 unmodified lines
modified:src/types.ts-7 removed
6 unmodified lines
7export type Objectish = any[] | Map<any, any> | Set<any> | {}89export type ObjectishNoSet = any[] | Map<any, any> | {}1011// export interface ImmerState<T = any> {12// parent?: ImmerState13// base: T14// copy: T15// assigned: {[prop: string]: boolean; [index: number]: boolean}16// }1711export type AnyObject = {[key: string]: any}12export type AnyArray = Array<any>13export type AnySet = Set<any>14export type AnyMap = Map<any, any>
195 unmodified lines