Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while executing library code (DOM exception) #6

Open
bengourley opened this issue Nov 22, 2017 · 1 comment
Open

Error while executing library code (DOM exception) #6

bengourley opened this issue Nov 22, 2017 · 1 comment

Comments

@bengourley
Copy link

First of all, I'm really excited to learn of the existence of this project so thanks for that 👌

I'm trying to use it on the .d.ts files I've written for bugsnag-js which will be distributed with the project. In the past we've struggled with .d.ts files not being up to date with the JS code in the library, so what I really want is a program that verifies the correctness of the types that I can run as part of the tests.

When I try to execute tscheck against my library/types, I get the following error:

Error while executing library code
InvalidCharacterError: DOM Exception 5: An invalid or illegal character was specified, such as in an XML name.

  phantomjs://code/jsnap1171022-20209-1k8owbv.q8yk:2800 in enqueue
  phantomjs://code/jsnap1171022-20209-1k8owbv.q8yk:2800 in convertValue
  phantomjs://code/jsnap1171022-20209-1k8owbv.q8yk:2768 in dump
  phantomjs://code/jsnap1171022-20209-1k8owbv.q8yk:2823

Steps to reproduce

npm i -g tscheck
git clone [email protected]:bugsnag/bugsnag-js.git
cd bugsnag-js
git checkout 408ca0100f80aad2708a01de6df1d457502e50c8
npm run build
tscheck dist/bugsnag.js types/bugsnag.d.ts
software version
tscheck 0.1.4
npm 5.4.2
node 8.3.0
typescript 2.6.1
@asgerf
Copy link
Owner

asgerf commented Nov 23, 2017

Hi, thanks for the clear bug report.

I have updated jsnap to use a newer version of phantomjs, which seems to resolve that particular issue.

Unfortunately, I haven't updated tscheck for years, so it only works for really old versions of TypeScript (something like 1.0). This means it won't be of much use to you.

However, I've recently started using TypeScript again so I might actually revive this project. But it's not going to be a quick fix so it will be a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants