-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@tsplus/stdlib): add Differ data type
- Loading branch information
Showing
217 changed files
with
1,582 additions
and
193 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,5 @@ | ||
--- | ||
"@tsplus/stdlib": patch | ||
--- | ||
|
||
add Differ data type |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,6 @@ | ||
// codegen:start {preset: barrel, include: ./Chunk/*.ts, prefix: "@tsplus/stdlib/collections"} | ||
export * from "@tsplus/stdlib/collections/Chunk/append" | ||
export * from "@tsplus/stdlib/collections/Chunk/buckets" | ||
export * from "@tsplus/stdlib/collections/Chunk/builder" | ||
export * from "@tsplus/stdlib/collections/Chunk/collect" | ||
export * from "@tsplus/stdlib/collections/Chunk/collectWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/collectWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/compact" | ||
export * from "@tsplus/stdlib/collections/Chunk/compactF" | ||
export * from "@tsplus/stdlib/collections/Chunk/compactWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/concat" | ||
export * from "@tsplus/stdlib/collections/Chunk/dedupe" | ||
export * from "@tsplus/stdlib/collections/Chunk/definition" | ||
export * from "@tsplus/stdlib/collections/Chunk/difference" | ||
export * from "@tsplus/stdlib/collections/Chunk/drop" | ||
export * from "@tsplus/stdlib/collections/Chunk/dropRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/dropWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/elem" | ||
export * from "@tsplus/stdlib/collections/Chunk/empty" | ||
export * from "@tsplus/stdlib/collections/Chunk/equals" | ||
export * from "@tsplus/stdlib/collections/Chunk/exists" | ||
export * from "@tsplus/stdlib/collections/Chunk/extend" | ||
export * from "@tsplus/stdlib/collections/Chunk/fill" | ||
export * from "@tsplus/stdlib/collections/Chunk/filter" | ||
export * from "@tsplus/stdlib/collections/Chunk/filterWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/find" | ||
export * from "@tsplus/stdlib/collections/Chunk/findIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/findLast" | ||
export * from "@tsplus/stdlib/collections/Chunk/findLastIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/flatMap" | ||
export * from "@tsplus/stdlib/collections/Chunk/flatten" | ||
export * from "@tsplus/stdlib/collections/Chunk/forAll" | ||
export * from "@tsplus/stdlib/collections/Chunk/forAny" | ||
export * from "@tsplus/stdlib/collections/Chunk/forEach" | ||
export * from "@tsplus/stdlib/collections/Chunk/forEachF" | ||
export * from "@tsplus/stdlib/collections/Chunk/forEachWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/get" | ||
export * from "@tsplus/stdlib/collections/Chunk/getAssociative" | ||
export * from "@tsplus/stdlib/collections/Chunk/getAssociativeIdentity" | ||
export * from "@tsplus/stdlib/collections/Chunk/getEquivalence" | ||
export * from "@tsplus/stdlib/collections/Chunk/getOrd" | ||
export * from "@tsplus/stdlib/collections/Chunk/getShow" | ||
export * from "@tsplus/stdlib/collections/Chunk/grouped" | ||
export * from "@tsplus/stdlib/collections/Chunk/head" | ||
export * from "@tsplus/stdlib/collections/Chunk/indexWhere" | ||
export * from "@tsplus/stdlib/collections/Chunk/indexWhereFrom" | ||
export * from "@tsplus/stdlib/collections/Chunk/instances" | ||
export * from "@tsplus/stdlib/collections/Chunk/intersection" | ||
export * from "@tsplus/stdlib/collections/Chunk/isEmpty" | ||
export * from "@tsplus/stdlib/collections/Chunk/isNonEmpty" | ||
export * from "@tsplus/stdlib/collections/Chunk/join" | ||
export * from "@tsplus/stdlib/collections/Chunk/last" | ||
export * from "@tsplus/stdlib/collections/Chunk/make" | ||
export * from "@tsplus/stdlib/collections/Chunk/makeBy" | ||
export * from "@tsplus/stdlib/collections/Chunk/map" | ||
export * from "@tsplus/stdlib/collections/Chunk/mapAccum" | ||
export * from "@tsplus/stdlib/collections/Chunk/mapWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/materialize" | ||
export * from "@tsplus/stdlib/collections/Chunk/partition" | ||
export * from "@tsplus/stdlib/collections/Chunk/partitionMap" | ||
export * from "@tsplus/stdlib/collections/Chunk/partitionMapWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/partitionWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/prepend" | ||
export * from "@tsplus/stdlib/collections/Chunk/range" | ||
export * from "@tsplus/stdlib/collections/Chunk/reduce" | ||
export * from "@tsplus/stdlib/collections/Chunk/reduceRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/reduceRightWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/reduceWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/reduceWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/reverse" | ||
export * from "@tsplus/stdlib/collections/Chunk/reverseBuckets" | ||
export * from "@tsplus/stdlib/collections/Chunk/separate" | ||
export * from "@tsplus/stdlib/collections/Chunk/separateF" | ||
export * from "@tsplus/stdlib/collections/Chunk/separateWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/single" | ||
export * from "@tsplus/stdlib/collections/Chunk/size" | ||
export * from "@tsplus/stdlib/collections/Chunk/sort" | ||
export * from "@tsplus/stdlib/collections/Chunk/sortBy" | ||
export * from "@tsplus/stdlib/collections/Chunk/split" | ||
export * from "@tsplus/stdlib/collections/Chunk/splitAt" | ||
export * from "@tsplus/stdlib/collections/Chunk/splitWhere" | ||
export * from "@tsplus/stdlib/collections/Chunk/tail" | ||
export * from "@tsplus/stdlib/collections/Chunk/take" | ||
export * from "@tsplus/stdlib/collections/Chunk/takeRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/takeWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/toArrayLike" | ||
export * from "@tsplus/stdlib/collections/Chunk/toCollection" | ||
export * from "@tsplus/stdlib/collections/Chunk/unfold" | ||
export * from "@tsplus/stdlib/collections/Chunk/union" | ||
export * from "@tsplus/stdlib/collections/Chunk/uniq" | ||
export * from "@tsplus/stdlib/collections/Chunk/unit" | ||
export * from "@tsplus/stdlib/collections/Chunk/unsafeGet" | ||
export * from "@tsplus/stdlib/collections/Chunk/unsafeHead" | ||
export * from "@tsplus/stdlib/collections/Chunk/unsafeLast" | ||
export * from "@tsplus/stdlib/collections/Chunk/unsafeTail" | ||
export * from "@tsplus/stdlib/collections/Chunk/unzip" | ||
export * from "@tsplus/stdlib/collections/Chunk/zip" | ||
export * from "@tsplus/stdlib/collections/Chunk/zipAll" | ||
export * from "@tsplus/stdlib/collections/Chunk/zipAllWith" | ||
export * from "@tsplus/stdlib/collections/Chunk/zipWith" | ||
export * from "@tsplus/stdlib/collections/Chunk/zipWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/zipWithIndexOffset" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations" | ||
export * from "@tsplus/stdlib/collections/Chunk/patch" | ||
// codegen:end |
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,101 @@ | ||
// codegen:start {preset: barrel, include: ./operations/*.ts, prefix: "@tsplus/stdlib/collections/Chunk"} | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/append" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/buckets" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/builder" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/collect" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/collectWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/collectWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/compact" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/compactF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/compactWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/concat" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/dedupe" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/difference" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/drop" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/dropRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/dropWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/elem" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/empty" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/equals" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/exists" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/extend" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/fill" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/filter" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/filterWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/find" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/findIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/findLast" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/findLastIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/flatMap" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/flatten" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/forAll" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/forAny" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/forEach" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/forEachF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/forEachWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/get" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/getAssociative" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/getAssociativeIdentity" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/getEquivalence" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/getOrd" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/getShow" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/grouped" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/head" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/indexWhere" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/indexWhereFrom" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/intersection" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/isEmpty" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/isNonEmpty" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/join" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/last" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/make" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/makeBy" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/map" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/mapAccum" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/mapWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/materialize" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/partition" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/partitionMap" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/partitionMapWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/partitionWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/prepend" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/range" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reduce" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reduceRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reduceRightWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reduceWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reduceWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reverse" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/reverseBuckets" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/separate" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/separateF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/separateWithIndexF" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/single" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/size" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/sort" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/sortBy" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/split" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/splitAt" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/splitWhere" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/tail" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/take" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/takeRight" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/takeWhile" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/toArrayLike" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/toCollection" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unfold" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/union" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/uniq" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unit" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unsafeGet" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unsafeHead" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unsafeLast" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unsafeTail" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/unzip" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zip" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zipAll" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zipAllWith" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zipWith" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zipWithIndex" | ||
export * from "@tsplus/stdlib/collections/Chunk/operations/zipWithIndexOffset" | ||
// codegen:end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,4 @@ | ||
// codegen:start {preset: barrel, include: ./patch/*.ts, prefix: "@tsplus/stdlib/collections/Chunk"} | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/definition" | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/operations" | ||
// codegen:end |
102 changes: 102 additions & 0 deletions
102
packages/stdlib/_src/collections/Chunk/patch/definition.ts
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,102 @@ | ||
export const ChunkPatchSym = Symbol.for("@Differ.Chunk.Patch") | ||
export type ChunkPatchSym = typeof ChunkPatchSym | ||
|
||
export const ChunkPatchValueSym = Symbol.for("@Differ.Chunk.Patch.Value") | ||
export type ChunkPatchValueSym = typeof ChunkPatchValueSym | ||
|
||
export const ChunkPatchPatchSym = Symbol.for("@Differ.Chunk.Patch.Patch") | ||
export type ChunkPatchPatchSym = typeof ChunkPatchPatchSym | ||
|
||
/** | ||
* A patch which describes updates to a chunk of values. | ||
* | ||
* @tsplus type Differ.Chunk.Patch | ||
*/ | ||
export interface ChunkPatch<in out Value, in out Patch> { | ||
readonly [ChunkPatchSym]: ChunkPatchSym | ||
readonly [ChunkPatchValueSym]: (_: Value) => Value | ||
readonly [ChunkPatchPatchSym]: (_: Patch) => Patch | ||
} | ||
|
||
/** | ||
* @tsplus type Differ.Chunk.Patch.Ops | ||
*/ | ||
export interface ChunkPatchOps { | ||
readonly $: ChunkPatchAspects | ||
} | ||
/** | ||
* @tsplus static Differ.Ops Chunk | ||
*/ | ||
export const ChunkPatch: ChunkPatchOps = { | ||
$: {} | ||
} | ||
|
||
/** | ||
* @tsplus type Differ.Chunk.Patch.Aspects | ||
*/ | ||
export interface ChunkPatchAspects {} | ||
|
||
/** | ||
* @tsplus unify Differ.Chunk.Patch | ||
*/ | ||
export function unifyChunkPatch<X extends ChunkPatch<any, any>>(self: X): ChunkPatch< | ||
[X] extends [{ [ChunkPatchValueSym]: (_: infer Value) => infer Value }] ? Value : never, | ||
[X] extends [{ [ChunkPatchPatchSym]: (_: infer Patch) => infer Patch }] ? Patch : never | ||
> { | ||
return self | ||
} | ||
|
||
export abstract class BaseChunkPatch<Value, Patch> implements ChunkPatch<Value, Patch> { | ||
readonly [ChunkPatchSym]: ChunkPatchSym = ChunkPatchSym | ||
readonly [ChunkPatchValueSym]!: (_: Value) => Value | ||
readonly [ChunkPatchPatchSym]!: (_: Patch) => Patch | ||
} | ||
|
||
export class AppendChunkPatch<Value, Patch> extends BaseChunkPatch<Value, Patch> { | ||
readonly _tag = "Append" | ||
constructor(readonly values: Chunk<Value>) { | ||
super() | ||
} | ||
} | ||
|
||
export class SliceChunkPatch<Value, Patch> extends BaseChunkPatch<Value, Patch> { | ||
readonly _tag = "Slice" | ||
constructor(readonly from: number, readonly until: number) { | ||
super() | ||
} | ||
} | ||
|
||
export class UpdateChunkPatch<Value, Patch> extends BaseChunkPatch<Value, Patch> { | ||
readonly _tag = "Update" | ||
constructor(readonly index: number, readonly patch: Patch) { | ||
super() | ||
} | ||
} | ||
|
||
export class AndThenChunkPatch<Value, Patch> extends BaseChunkPatch<Value, Patch> { | ||
readonly _tag = "AndThen" | ||
constructor(readonly first: ChunkPatch<Value, Patch>, readonly second: ChunkPatch<Value, Patch>) { | ||
super() | ||
} | ||
} | ||
|
||
export class EmptyChunkPatch<Value, Patch> extends BaseChunkPatch<Value, Patch> { | ||
readonly _tag = "Empty" | ||
} | ||
|
||
export type ChunkPatchInstruction = | ||
| AppendChunkPatch<any, any> | ||
| SliceChunkPatch<any, any> | ||
| UpdateChunkPatch<any, any> | ||
| AndThenChunkPatch<any, any> | ||
| EmptyChunkPatch<any, any> | ||
|
||
/** | ||
* @tsplus macro identity | ||
*/ | ||
export function chunkPatchInstruction<Value, Patch>( | ||
self: ChunkPatch<Value, Patch> | ||
): ChunkPatchInstruction { | ||
// @ts-expect-error | ||
return self | ||
} |
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,6 @@ | ||
// codegen:start {preset: barrel, include: ./operations/*.ts, prefix: "@tsplus/stdlib/collections/Chunk/patch"} | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/operations/apply" | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/operations/combine" | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/operations/diff" | ||
export * from "@tsplus/stdlib/collections/Chunk/patch/operations/emptyPatch" | ||
// codegen:end |
Oops, something went wrong.