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

refactor: convert js to ts #6

Merged
merged 6 commits into from
Jan 20, 2020
Merged

refactor: convert js to ts #6

merged 6 commits into from
Jan 20, 2020

Conversation

SuaYoo
Copy link
Contributor

@SuaYoo SuaYoo commented Jan 20, 2020

Fixes the following build error on import in Angular projects:

ERROR in node_modules/@telnyx/webrtc/lib/BaseClient.d.ts:1:26 - error TS2307: Cannot find module './TypedEmitter'.

1 import TypedEmitter from './TypedEmitter';
                           ~~~~~~~~~~~~~~~~
node_modules/@telnyx/webrtc/lib/Verto/Verto.d.ts:1:28 - error TS2307: Cannot find module './LiveArray'.

1 import VertoLiveArray from './LiveArray';
                             ~~~~~~~~~~~~~
node_modules/@telnyx/webrtc/lib/Verto/Verto.d.ts:2:23 - error TS2307: Cannot find module './ConfMan'.

2 import VertoConf from './ConfMan';
                        ~~~~~~~~~~~
node_modules/@telnyx/webrtc/lib/Verto/Verto.d.ts:3:25 - error TS2307: Cannot find module './Dialog'.

3 import VertoDialog from './Dialog';

See microsoft/TypeScript#7546 (comment)

Manual testing

  1. Run npm link
  2. Outside of this repo, generate new project with Angular CLI and install @telnyx/webrtc
  3. From the Angular project, run npm link @telnyx/webrtc
  4. Import TelnyxRTC and start app with ng serve. App should compile without errors

Warning I haven't tested actual calls as of 4d59d0f

@SuaYoo SuaYoo marked this pull request as ready for review January 20, 2020 18:59
@SuaYoo SuaYoo requested a review from DeividVeloso January 20, 2020 19:00
Copy link
Contributor

@DeividVeloso DeividVeloso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@DeividVeloso DeividVeloso merged commit 5ab49d6 into master Jan 20, 2020
@DeividVeloso DeividVeloso deleted the Convert_JS_to_TS branch January 20, 2020 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants