question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better typescript support

See original GitHub issue

Version: 6.1.0

Environment:

  • Operating system: Any
  • Browser: Any
  • Node.js: 7.3.0
  • typescript 2.2.1.0

Expected result: The typescript definition file should be recognized automatically.

Actual result: We need to add /// <reference path="./node_modules/primus/primus.d.ts" /> to every file

Steps to solve it: Add the following row to the package.json file "typings": "primus.d.ts"

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
gurt-ilcommented, May 10, 2017

Now I’m getting primus_1.Primus is not a constructor on the node window. My code looks like this:

import { Primus, ISpark } from "primus"

var primus = new Primus(this.httpServer, { transformer: "uws", pathname: "/ws" });

Anybody has similar problem? Am I doing something wrong?

Thanks

1reaction
lholznagelcommented, Feb 26, 2017

Targeting tomorrow for the pr 👍

The adding of "typings": "primus.d.ts" will be a part of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript: JavaScript With Syntax For Types.
TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. Try TypeScript Now. Online or...
Read more >
Comparing the best TypeScript IDEs
Compare the best IDEs for TypeScript, including Visual Studio Code, WebStorm, and Visual Studio 2019/2022.
Read more >
TypeScript Programming with Visual Studio Code
VS Code comes with great debugging support for TypeScript, including support for sourcemaps. Set breakpoints, inspect objects, navigate the call stack, and ...
Read more >
Pros and Cons of TypeScript
TypeScript supports concepts from class-based object-oriented programming (OOP) like classes, interfaces, inheritance, and more.
Read more >
Improving Workers TypeScript support
Improving Workers TypeScript support: accuracy, ergonomics and interoperability. TypeScript makes it easy for developers to write code that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found