Skip to content

Commit

Permalink
perf: removed async to prevent TypeScript from adding the ES5 polyf…
Browse files Browse the repository at this point in the history
…ills
  • Loading branch information
tannerntannern committed Jun 9, 2019
1 parent 54d445f commit a274628
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// TODO FEATURES:
// - input.batch inside adapters
// - don't use await in here to avoid boilerplate bloat from es5 transpilation

type InputTypes = {
[type: string]: any
Expand Down Expand Up @@ -87,9 +86,7 @@ export const makeAdapter = <R = any, I extends InputFormat = InputFormat, O = an
const attachments: Attachments<R, I, O> = {
then: (result) => result,
catch: (err) => {throw err;},
input: async (key) => {
throw new Error(`Input "${key}" must be supplied`);
},
input: key => Promise.reject(new Error(`Input "${key}" must be supplied`)),
output: () => {}
};

Expand Down

0 comments on commit a274628

Please sign in to comment.