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

SvgPanZoom namespace workaround #165

Merged
merged 2 commits into from
May 26, 2020
Merged

SvgPanZoom namespace workaround #165

merged 2 commits into from
May 26, 2020

Conversation

mac2000
Copy link
Contributor

@mac2000 mac2000 commented May 26, 2020

Hopefully will also fix #91 required for graphql-faker voyager tab

While we are waiting for PR to dependency library there is an workaround

The problem is that in dependency there is outdated namespace way of declarations which indeed makes everything harder

Unfortunately we can not force other library to make es6 like modules

But there is an workaround - we just declare required interfaces and everything become working

How I did check this:

Prepared test.json with following content:

{
  "extends": "./tsconfig.lib.json",
  "include": ["./typings/**/*.ts" ]
}
# cleanup everything
rm -rf dist middleware typings node_modules
# install dependencies
yarn
# build
yarn build:release
# test
.\node_modules\.bin\tsc --noEmit -p test.json

without this change we got:

typings/graph/viewport.d.ts:6:13 - error TS2503: Cannot find namespace 'SvgPanZoom'.

6     zoomer: SvgPanZoom.Instance;
              ~~~~~~~~~~

Found 1 error.

with them - everything is ok

@IvanGoncharov IvanGoncharov merged commit 5b594f6 into graphql-kit:master May 26, 2020
@IvanGoncharov
Copy link
Member

IvanGoncharov commented May 26, 2020

@mac2000 Merged and released as graphql-voyager@1.0.0-rc.31 🎉

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

Successfully merging this pull request may close these issues.

Angular 6 Error message
2 participants