-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Cardano-Forge/fix/types-cli-compile
fix: types in the CLI part
- Loading branch information
Showing
10 changed files
with
69 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* A union type representing validation states: success, warning, or error. | ||
*/ | ||
export type State = "success" | "warning" | "error"; | ||
|
||
/** | ||
* Type representing a validation result containing state, message, input, output (optional), assetName, and validatorId. | ||
*/ | ||
export interface Result { | ||
/** | ||
* The current validation state. | ||
*/ | ||
state: State; | ||
|
||
/** | ||
* An optional message or object associated with the validation result. Defaults to `undefined`. | ||
*/ | ||
message: string | object | undefined; | ||
|
||
/** | ||
* The input data that was validated. | ||
*/ | ||
input: unknown; | ||
|
||
/** | ||
* The output data resulting from successful validation (optional). Set to `undefined` when there is an error/warning. | ||
*/ | ||
output: unknown | undefined; | ||
|
||
/** | ||
* The name of the asset being validated. | ||
*/ | ||
assetName: string; | ||
|
||
/** | ||
* The identifier for the validator used in this result. | ||
*/ | ||
validatorId: string; | ||
} | ||
|
||
/** | ||
* Type representing a record containing data keyed by string. | ||
*/ | ||
export type DataRead = Record<string, unknown>; |
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