-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design Meeting Notes, 2/24/2023 #52953
Comments
To integrate modules that are not We chose the second option, we overridden the Creating d.ts files is much slower and triggers a lot of processes, git plugins, eslint, etc... Options |
Vue also patched |
For the LS plugin, you should be able to do everything you need by providing host methods. I didn't find that vue-tsc, and that's really unfortunate. But, that's not a runtime patch, kinda like some of the other ones, and is already fragile as it is... |
The host does not have a method that is responsible for returning the synthetic content of files with a custom extension, which is why you have to do these dirty hacks. If d.ts files are created synthetically in runtime, then it is more efficient not to create these files on the file system, you need to add a method to the host that can be overridden, which will return the generated content in the d.ts syntex for files with custom extensions. |
I'm a little confused; is |
In any case, this issue is not the right place for this sort of discussion; there's an issue for the css plugin (#52847), and I think it'd be best if there were a distinct issue for the APIs that you believe are missing too, so we can either track the addition, or commentary on a safer way to do the same thing. |
No readFile, only called for files that exist on the filesystem, we don't create files on the filesystem. Ok, I'll open a new issue, thanks. |
Sorry, I should have expanded that more; readFile + the other FS related methods, like readDirectory and such too. |
Done |
FYI |
Everything here was related to TypeScript 5.0, I don't think it has anything to do with a change which happened in TypeScript 5.7 |
Libraries Patching TypeScript's API
https://gist.github.com/jakebailey/3e73c7aab4da2044a95121467aa3b4e9
createLanguageServiceSourceFile
andupdateLanguageServiceSourceFile
resolveModuleName
--moduleResolution bundler
--allowArbitraryExtensions
.d.vue.ts
files.ModuleResolutionHost
- is there a way to control that?resolveModuleNames
proxyPluginHost
should sethost.resolveModuleNameLiterals
.resolveModuleNameLiterals
is the right thing.createProgram
createProgram
, lots of other top-level stuff to enable caching.executeCommandLine
public?program.emit
is overridable fromexecuteCommandLine
noEmit
and then force emit.ts.sys
/* @internal */ function setSys
that they can use.resolveModuleName
- they should be passing this into theCompilerHost
they createCompilerHost
readJson
- only reason for this is caching.emitFiles
- patched so that they can support multiple emit targets.CompilerHost
, just patch it every time and re-run emit.Comparing Wrapper Objects
1
is anumber
Number(1)
is anumber
new Number(1)
is aNumber
- a wrapper object.===
is suspect though.number < Number
is disallowedvalueOf
(Stricter relational comparisons checkingvalueOf
#52807) - which re-allowsnumber < Number
!ban-types
which stops these.number < Number
in 5.0 - it's too late in the game regardless of what happens in 5.1.NaN
checks.The text was updated successfully, but these errors were encountered: