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
{{ message }}
Repository navigation
Typescript development problem: Is specialized knowledge required to solve fourslash errors? #56283
I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment
I have a pull #56281 which involves changing src/lib/rs5.d.ts.
I think because it changes that file, there are a few fourslash errors similar to this one:
fourslash tests
tests/cases/fourslash/completionListInTypeParameterOfClassExpression1.ts
fourslash test completionListInTypeParameterOfClassExpression1.ts runs correctly:
AssertionError: At marker "4": expected [ 'D', 'any', 'Array', …(138) ] to deeply equal [ 'D', 'any', 'Array', …(137) ]
at _TestState.verifyCompletionsAreExactly (src/harness/fourslashImpl.ts:1213:16)
at _TestState.verifyCompletionsWorker (src/harness/fourslashImpl.ts:1074:18)
at _TestState.verifyCompletions (src/harness/fourslashImpl.ts:1009:25)
at Verify.completions (src/harness/fourslashInterfaceImpl.ts:251:31)
at eval (completionListInTypeParameterOfClassExpression1.js:8:8)
at runCode (src/harness/fourslashImpl.ts:4607:9)
at runFourSlashTestContent (src/harness/fourslashImpl.ts:4565:5)
at runFourSlashTest (src/harness/fourslashImpl.ts:4548:5)
at Context.<anonymous> (src/testRunner/fourslashRunner.ts:60:39)
at processImmediate (node:internal/timers:478:21)
They don't go away after hereby baseline-accept.
Does this require changing the LKG?
Otherwise, how to inspect the differences and modify the baseline?
However, needing to modify this may indicate that something is wrong with the PR (which I have not read; I am not sure anything has changed to make filter(Boolean) any more acceptable than before).
However, needing to modify this may indicate that something is wrong with the PR (which I have not read; I am not sure anything has changed to make filter(Boolean) any more acceptable than before).
I had added a BooleanConverter interface which has only the conversion with no constructor, to use as filter predicate. The idea being to be as specific as possible. However, based on your advice about the cost of changing globals, which I agree with, I have removed it now, and it is using BooleanConstructor without issue.
Activity
jakebailey commentedon Nov 1, 2023
If you read the test case, you'll see it mention
globalTypesPlus, which depends onTypeScript/src/harness/fourslashInterfaceImpl.ts
Line 1108 in 73bc0eb
jakebailey commentedon Nov 1, 2023
However, needing to modify this may indicate that something is wrong with the PR (which I have not read; I am not sure anything has changed to make
filter(Boolean)any more acceptable than before).craigphicks commentedon Nov 1, 2023
I had added a
BooleanConverterinterface which has only the conversion with no constructor, to use as filter predicate. The idea being to be as specific as possible. However, based on your advice about the cost of changing globals, which I agree with, I have removed it now, and it is using BooleanConstructor without issue.typescript-bot commentedon Nov 4, 2023
This issue has been marked as "Question" and has seen no recent activity. It has been automatically closed for house-keeping purposes.