robertkrimen / otto

A JavaScript interpreter in Go (golang)

Home Page:http://godoc.org/github.com/robertkrimen/otto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: How to run `export default { entry: './src/index.ts' } `

renzp94 opened this issue · comments

I have a file config.ts, the content is export default { entry: './src/index.ts' }.
I want get struct {entry: './src/index.ts'}.
I try vm.Run, error: (anonymous): Line 1:1 Unexpected reserved word
What shall I do?
I hope you can answer my questions. Thank you very much

commented

Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.

https://github.com/robertkrimen/otto#caveat-emptor

Typescript is not javascript.

ok.Thanks.