assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

Add global types recognition for advanced developers

Open jtenner opened this issue 2 years ago • 3 comments

When dealing with adding global types for end users, as-pect and cli tools have always relied on adding something like this to an end user's project:

/// <reference path="../path/to/types.d.ts" />

I instead propose standardizing recognizing types that follow the ../node_modules/**/assembly/global.d.ts pattern out of the box. This of course is not a perfect solution, and I am amenable to other solutions in the same vein as this one, however, this one seems like the simplest way to fix a long standing problem for cli developers using the compiler programmatically.

⯈ ⯈ ⯈

  • [x] I've read the contributing guidelines
  • [x] I've added my name and email to the NOTICE file

jtenner avatar Apr 21 '22 18:04 jtenner

Is cli/tsconfig.json the right file for this change? A typical project would have an assembly/tsconfig.json extended from assemblyscript/std/assembly.json as per what asinit generates.

dcodeIO avatar Apr 23 '22 17:04 dcodeIO

Did I change the correct file? I'm sorry if it was wrong. I would love some help.

jtenner avatar Apr 26 '22 15:04 jtenner

It could be that the correct file is the one asinit generates. Iirc, as soon as the earliest tsconfig has an include entry, it overrides what's in the extended base file, not add to it - but not 100% sure. Could you test? :)

dcodeIO avatar Apr 26 '22 17:04 dcodeIO

This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Nov 07 '23 23:11 github-actions[bot]

This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.

github-actions[bot] avatar Nov 15 '23 23:11 github-actions[bot]