You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that undoing #4308 is likely the wrong way to do it. That corrected behavior where browserify was "covering up" the issue (by shimming fs). I can see two ways of going about it.
Keep the current return undefined behavior for ts.sys in the case of a browser but reduce the test harness's dependency on it. For instance, the current error is because the CScript and Node executing environments currently always run and look like this:
similar to the way you do the same for fso for CScript then that issue goes away. However, there are numerous other dependencies on ts.sys like useCaseSensitiveFileNames and newLine and it would probably be a pretty large undertaking to fix all occurrences. It's not clear to me if TypeScript, in general, is designed to run with ts.sys undefined.
Instead of returning undefined, go ahead and shim ts.sys in a minimal way that works for the browser. I did something like this:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4359