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.

Using external library which contains typing

See original GitHub issue

I’ve been trying to use reflect-metadata but i’m unable to get compiled with ADVANCED compilation

tscc.spec.json

 "external": {
    "reflect-metadata": "Reflect"
  }`

main.ts import "reflect-metadata";

I see externs generated for the package but no source code generated.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
theseanlcommented, Oct 7, 2022

Well, a good virtue of every bug report is to provide an expected behavior and an actual behavior you are observing. It seems that you don’t understand what external does.

0reactions
karadnizedcommented, Oct 7, 2022

@theseanl The library should add functions the Reflect global. Reflect.defineMetadata is not a native function. It will be added the library and that’s what i don’t see.

It’s more like adding extra functions to Reflect by they aren’t there 😃. If webpack example will help i can create one

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How to handle insufficient typing in external libraries?
I like making use of the typing capabilities in Python along with a static type check e.g. pyright. Unfortunately, not all libraries are ......
Read more >
TypeScript: Adding Custom Type Definitions for Existing ...
Whether or not a library has type definitions is a big factor in deciding whether I'll use it. You can find the type...
Read more >
Using a JavaScript library (without type declarations ... - Medium
Let's say you want to use a library in your TypeScript project. ... has stepped in to provide them through the Definitely Typed...
Read more >
How to Declare Missing Types for External Libraries -- newline
However, sometimes libraries don't have type declarations. In this case type to find them in DefinitelyTyped repository and install them.
Read more >
typing — Support for type hints — Python 3.11.1 documentation
This module provides runtime support for type hints. The most fundamental support consists of the types Any , Union , Callable , TypeVar...
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