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.

FR: export as namespace admin; in declaration file

See original GitHub issue

I’ve been trying to use admin.auth.DecodedIdToken in my global declaration file but I’ve found out that export = admin only exports types in admin without nested namespaces. I did a quick research and learned that export as namespace admin; can be used to whole namespace.

Is there any particular reason for not to export whole namespace?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hiranya911commented, Apr 23, 2018

But if the code compiles with tsc (which it does), and works fine in some IDEs (e.g. VSCode), I can’t see this as a problem in the SDK:

vscode_nodejs
0reactions
ibrahimdurancommented, Jun 19, 2018

I’ve just come across a workaround posted in 2016 for this issue, which still works as a charm. It can be found here with additional details https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232. It worked for me and I think this issue can be closed since there is a workaround without modifying the library code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"export as namespace" automatically in declaration file
"export as namespace" automatically in declaration file ... I have a small ts library that gets outputed as UMD and I also output...
Read more >
How To Use Namespaces in TypeScript | DigitalOcean
Right now, you are saying that this module exports a single namespace called vector3 , which is currently empty. Save and exit from...
Read more >
Modules and Namespaces - Typescript - Dot Net Tricks
In TypeScript, you can export any declaration such as a variable, function, class, type alias, or interface by using the export keyword.
Read more >
Namespaces Walkthrough | Kubernetes
Create pods in each namespace. A Kubernetes namespace provides the scope for Pods, Services, and Deployments in the cluster. Users interacting ...
Read more >
Solution - Typescript: Migration from Namespaces to Modules
import * as users from "path/to/file/users-module";. ​. declare global {. namespace Application.Administration {. export import Users = users;. }.
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