Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

sol-compiler constructor argument cannot be undefined #1594

Closed
frangio opened this issue Feb 6, 2019 · 0 comments · Fixed by #1596
Closed

sol-compiler constructor argument cannot be undefined #1594

frangio opened this issue Feb 6, 2019 · 0 comments · Fixed by #1596

Comments

@frangio
Copy link

frangio commented Feb 6, 2019

The Compiler constructor is typed and documented with an optional argument, but there's actually a runtime validation that doesn't allow omitting it.

constructor(opts?: CompilerOptions) {
assert.doesConformToSchema('opts', opts, compilerOptionsSchema);

> const compiler = new Compiler()
Error: opts can't be undefined
    at Object.doesConformToSchema (/home/frangio/zs/oz/docgen/node_modules/@0x/assert/lib/src/index.js:55:19)
    at new Compiler (/home/frangio/zs/oz/docgen/node_modules/@0x/sol-compiler/lib/src/compiler.js:126:25)
    at repl:1
    at Script.runInThisContext (vm.js:123:20)
    at REPLServer.defaultEval (repl.js:332:29)
    at bound (domain.js:393:14)
    at REPLServer.runBound [as eval] (domain.js:406:12)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant