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.

Typesafe namespaces

See original GitHub issue

Currently one has to type local name fully. Indeed this is error-prone: one typo and your XML is invalid because you used non-existent namespace. Is it possible to add return type to the namespace method, which will be possible to reuse in attribute and element declaration? It son’t break any existing API (seemingly) but will allow more type-safe manner of work with namespaces

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
redundentcommented, Jul 11, 2022

Version 1.8.0 has been released. This should include all the changes requested. Let me know if there are any issues with your usecase.

1reaction
redundentcommented, Jul 4, 2022

Yep, you’re absolutely right. I’ll try to work on getting this implemented tomorrow

Read more comments on GitHub >

github_iconTop Results From Across the Web

ivanhofer/typesafe-i18n - add `namespaces` functionality
Namespaces would be a native option to load only selected parts of the translations. Useful for bigger applications so not all messages need ......
Read more >
How To Use Namespaces in TypeScript
In TypeScript, you can use namespaces to organize your code. Previously known as internal modules, namespaces in TypeScript are based on an ...
Read more >
Documentation - Declaration Merging
In TypeScript, a declaration creates entities in at least one of three groups: namespace, type, or value. Namespace-creating declarations create a namespace ......
Read more >
typescript - How to specify a generic type in a namespace ...
1 Answer 1 ... TypeScript namespaces have limitations on the type operations we can perform. If we try type operations on a namespace,...
Read more >
typesafe-i18n
An opinionated, fully type-safe, lightweight localization library for TypeScript and JavaScript projects with no external dependencies. npm ...
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