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.

How should we include addons in typings?

See original GitHub issue

There are two ways, or we could do both:

  1. Give typings for all addons on Terminal before they are loaded such that completions work for this:

    term.findNext('foo');
    

    We would need to warn in the jsdoc about needing to call loadAddon first for this.

  2. Give typings only for the object returned by loadAddon:

    const searchAddon = Terminal.loadAddon('search');
    searchAddon.findNext('foo');
    

Or both?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
pariskcommented, Aug 25, 2017

What if we:

  1. Implement typings for each add-on
  2. Ditch loadAddon, in favor of standard import mechanisms
  3. Expose each add-on’s API as a component in Terminal (e.g. term.attach, term.search etc.)

Or is this too “loose” for TypeScript?

0reactions
Tyriarcommented, Jun 3, 2018

This is stale

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Addons in TypeScript
Building addons in TypeScript offers many of the same benefits as building apps that way: it puts an extra tool at your disposal...
Read more >
typing-extensions - PyPI
Starting with version 4.0.0, typing_extensions uses Semantic Versioning. The major version is incremented for all backwards-incompatible changes. Therefore, ...
Read more >
Typescript declarations file for Node C++ Addon
Now I want to use TypeScript to do the same. I can't find the right combination of .d.ts file and import statement to...
Read more >
9 essential VS Code extensions for TypeScript - LogRocket Blog
Use VS Code extensions like TypeScript ESLint, TypeScript Toolbox, and TypeScript Importer to help configure and use TypeScript easily.
Read more >
Missing type definitions for Addon-Docs · Issue #8183 - GitHub
Hmmm I'm unsure about how we can export typings for each @storybook/addon-docs/XXXX "sub-packages" as types entry point of @storybook/addon-docs ...
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