Skip to content

Commit

Permalink
allow any an call out stringify behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Nava2 committed Jan 9, 2025
1 parent 842c685 commit 86b7bd2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions sources/src/env/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ export interface GradleEnvStateImplementation {
* Write a persistent value.
*
* @param key Property key
* @param value Value to store
* @param value Value to store, [JSON.stringify] will be called on the value if not a [string].
*/
save(key: string, value: string): void
// eslint-disable-next-line @typescript-eslint/no-explicit-any
save(key: string, value: any): void

/**
* Read an input parameter from the triggered workflow.
Expand All @@ -44,9 +45,10 @@ export interface GradleEnvStateImplementation {
* Sets env variable for this action and future actions in the job.
*
* @param name the name of the variable to set
* @param val the value of the variable.
* @param val the value of the variable, [JSON.stringify] will be called on the value if not a [string].
*/
exportVariable(name: string, val: string): void
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exportVariable(name: string, val: any): void

/**
* Sets the action status to failed.
Expand Down Expand Up @@ -81,7 +83,8 @@ class GradleEnvState implements GradleEnvStateImplementation {
return this.impl.get(key)
}

save(key: string, value: string): void {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
save(key: string, value: any): void {
this.impl.save(key, value)
}

Expand Down Expand Up @@ -122,7 +125,8 @@ class GradleEnvState implements GradleEnvStateImplementation {
return this.getBooleanInput(paramName)
}

exportVariable(name: string, val: string): void {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exportVariable(name: string, val: any): void {
return this.impl.exportVariable(name, val)
}

Expand Down

0 comments on commit 86b7bd2

Please sign in to comment.