Skip to content

Commit

Permalink
fix broken type-checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
bmschmidt committed May 15, 2024
1 parent 2fe0253 commit d6237e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ export function isTransform(input: unknown): input is DS.Transform {
export function isOpChannel(
input: DS.ChannelType,
): input is DS.OpChannel<DS.IsoDateString | number> {
return Object.keys(input).includes('op');
return !!input && Object.keys(input).includes('op');
}

export function isLambdaChannel(
input: DS.ChannelType,
): input is DS.LambdaChannel<DS.JSONValue, string | number | boolean> {
return Object.keys(input).includes('lambda');
return !!input && Object.keys(input).includes('lambda');
}

export function isConstantChannel(
input: DS.ChannelType,
): input is DS.ConstantChannel<string | number | boolean> {
return Object.keys(input).includes('constant');
return !!input && Object.keys(input).includes('constant');
}

export function isURLLabels(labels: DS.Labelcall): labels is DS.URLLabels {
Expand Down

0 comments on commit d6237e9

Please sign in to comment.