Skip to content

Commit

Permalink
Re-export io and ctx from experimental entrypoint for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmischka committed Jul 15, 2022
1 parent 0361c87 commit e075315
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/examples/nested/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { IntervalActionHandler } from '../..'
import ExperimentalInterval, { ActionGroup } from '../../experimental'
import ExperimentalInterval, { ActionGroup, io } from '../../experimental'

const interval = new ExperimentalInterval({
apiKey: 'alex_dev_kcLjzxNFxmGLf0aKtLVhuckt6sziQJtxFOdtM19tBrMUp5mj',
logLevel: 'debug',
endpoint: 'ws://localhost:3000/websocket',
})

const action: IntervalActionHandler = async io => {
const action: IntervalActionHandler = async () => {
const message = await io.input.text('Hello?')

return message
Expand Down
4 changes: 2 additions & 2 deletions src/experimental.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod'
import fetch from 'node-fetch'
import type { IncomingMessage, ServerResponse } from 'http'
import Interval, { IntervalError } from '.'
import Interval, { io, ctx, IntervalError } from '.'
import IntervalClient from './classes/IntervalClient'
import ActionGroup from './classes/ActionGroup'
import * as pkg from '../package.json'
Expand All @@ -13,7 +13,7 @@ import {
LambdaResponse,
} from './utils/http'

export { ActionGroup }
export { ActionGroup, io, ctx, IntervalError }

export default class ExperimentalInterval extends Interval {
/*
Expand Down

0 comments on commit e075315

Please sign in to comment.