Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
🏷️ Updating types
Browse files Browse the repository at this point in the history
  • Loading branch information
ci7lus committed Aug 8, 2020
1 parent 09a527a commit d1b9236
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ironpipe",
"version": "0.0.2",
"version": "0.0.3",
"author": "ci7lus <7887955+ci7lus@users.noreply.github.com>",
"description": "TypeScript typed helpers for pipedream.",
"repository": {
Expand Down
6 changes: 4 additions & 2 deletions src/component/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { string2 } from "../types"

type PropTypes = "string" | "number" | "boolean" | PipedreamPropTypes

type Prop<T> = PropOptions<T> | PropTypes
type Prop<T> = PropOptions<T> | PropTypes | string2

type PropTypesDefault = PropDefaultDInterfaceTimer

Expand All @@ -20,7 +20,7 @@ type PropOptions<T = any> = {
default?: PropTypesDefault | { [key: string]: any } | string | null
propDefinition?: [any, string]
optional?: boolean
options?: any[]
options?: ((...args: any) => string[] | Promise<string[]>) | string[] | any[]
}

type ConvertPropTypes<T> = T extends null
Expand All @@ -31,6 +31,8 @@ type ConvertPropTypes<T> = T extends null
? number
: T extends { type: "boolean" } | "boolean"
? boolean
: T extends { type: "string[]" } | "string[]"
? string[]
: T extends { type: "$.interface.timer" } | "$.interface.timer"
? PropReturnDInterfaceTimer
: T extends { type: "$.interface.http" } | "$.interface.http"
Expand Down

0 comments on commit d1b9236

Please sign in to comment.