-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed iterator helper node type persistence (#1222)
* WIP * new useOutputData
- Loading branch information
1 parent
6e31218
commit 8640760
Showing
8 changed files
with
78 additions
and
70 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { Type } from '@chainner/navi'; | ||
import { OutputId, OutputKind, SchemaId } from '../../../common/common-types'; | ||
|
||
export interface UseOutputData<T> { | ||
/** The current output data. Current here means most recent + up to date (= same input hash). */ | ||
readonly current: T | undefined; | ||
/** The most recent output data. */ | ||
readonly last: T | undefined; | ||
/** Whether the most recent output data ({@link last}) is not the current output data ({@link current}). */ | ||
readonly stale: boolean; | ||
} | ||
|
||
export interface OutputProps { | ||
readonly id: string; | ||
readonly outputId: OutputId; | ||
readonly label: string; | ||
readonly schemaId: SchemaId; | ||
readonly definitionType: Type; | ||
readonly hasHandle: boolean; | ||
readonly useOutputData: <T>( | ||
outputId: OutputId | ||
) => readonly [value: T, inputHash: string] | readonly [value: undefined, inputHash: undefined]; | ||
readonly useOutputData: <T>(outputId: OutputId) => UseOutputData<T>; | ||
readonly animated: boolean; | ||
readonly kind: OutputKind; | ||
} |
Oops, something went wrong.