Skip to content

Commit

Permalink
Make engineSwitch generic
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Aug 9, 2024
1 parent 128bfb4 commit 7dd980c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ export function stringToUint8Array(s: string): Uint8Array {
return bytes;
}

export function engineSwitch(
export function engineSwitch<T>(
engine: AppEngine,
rValue: string,
pythonValue: string,
): string {
rValue: T,
pythonValue: T,
): T {
switch (engine) {
case "r":
return rValue;
Expand Down

0 comments on commit 7dd980c

Please sign in to comment.