snowjs / cli

CLI tool for dead-simple serverless Docker deployments on managed Kubernetes services. A self-hosted PaaS. ⚡️
https://github.com/snowjs/cli/tree/secrets
MIT License
407 stars 10 forks source link

Add Typescript #3

Closed hipstersmoothie closed 5 years ago

hipstersmoothie commented 5 years ago

Incremental adoption of typescript.

petermikitsh commented 5 years ago

One build failure:

$ npm run build

> tsc

src/utils.ts:125:46 - error TS2345: Argument of type '(error: ExecException | null, stdout: string, stderr: string) => void' is not assignable to parameter of type '(error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void'.
  Types of parameters 'stdout' and 'stdout' are incompatible.
    Type 'string | Buffer' is not assignable to type 'string'.
      Type 'Buffer' is not assignable to type 'string'.

125     const cmd = childProcess.exec(str, opts, callback);
                                                 ~~~~~~~~

Found 1 error.

I'm going to continue work on this branch, but under a new PR. Thanks for contributing, @hipstersmoothie!