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.

Eliminate weird redundant `globals.d.ts` files

See original GitHub issue

In the course of maintaining the virtual objects stuff, whenever a change to the VatData API happens (which has been happening quite a bit as it’s under active development and evolving), it is necessary to perform coordinated changes to 6 separate globals.d.ts files in 6 separate packages:

packages/xsnap/src/globals.d.ts
packages/deploy-script-support/globals.d.ts
packages/run-protocol/globals.d.ts
packages/ERTP/globals.d.ts
packages/pegasus/globals.d.ts
packages/vats/globals.d.t

With the exception of the xsnap package, all of these files are identical and only declare VatData and its related parts, and even xsnaps’s does little more than that.

This is ludicrous, annoying, and potentially dangerous.

If we can’t get rid of these silly things, can we at least have just one of them in some standard place that everybody else can point to?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
turadgcommented, Mar 11, 2022

For @FUDCo 's particular grief with updating VatData we could import the def from a canonical place. https://github.com/Agoric/agoric-sdk/issues/4255

I’ll assign myself.

0reactions
mhofmancommented, Mar 11, 2022

I think this could and should be tackled at the same time as #4560, but there may be a quicker fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

json files should be usable in .d.ts files without breaking things
json file is a static resource, it should be able to be referenced in a global.d.ts file for example without that file being...
Read more >
How to import external type into global .d.ts file - Stack Overflow
I can import moment just fine throughout my project but I am unable to import it in my project's .d.ts definition files to...
Read more >
Documentation - Global .d.ts - TypeScript
Before writing a global declaration file, make sure the library isn't actually UMD. ... delete this declaration and add types inside the namespace...
Read more >
TypeScript Cheatsheet, Common Errors, and More
An issue I've run into in the past is trying to mix import , declare global , and declare module , all within...
Read more >
ts-node - npm
Locally in your project. npm install -D typescript npm install -D ... #!/usr/bin/env -S ts-node --files // This shebang works on Mac and ......
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