-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6832d5
commit 2803ee0
Showing
4 changed files
with
393 additions
and
17 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
9 changes: 9 additions & 0 deletions
9
js/packages/openinference-instrumentation-openai/src/typeUtils.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,9 @@ | ||
/** | ||
* Utility function that uses the type system to check if a switch statement is exhaustive. | ||
* If the switch statement is not exhaustive, there will be a type error caught in typescript | ||
* | ||
* See https://stackoverflow.com/questions/39419170/how-do-i-check-that-a-switch-block-is-exhaustive-in-typescript for more details. | ||
*/ | ||
export function assertUnreachable(_: never): never { | ||
throw new Error("Unreachable"); | ||
} |
Oops, something went wrong.