-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Error in 'setTextPos' during 'getCodeFixes' #49310
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
Comments
This issue reproduced in the following context:
|
This issue reproduced in the following context:
|
Redused-ish repro: /// <reference path="fourslash.ts" />
// @filename: index.esm.d.ts
//// export declare class Chart {
//// constructor(config: ChartConfiguration);
//// }
////
//// export interface ChartConfiguration {
//// options?: Partial<TickOptions>;
//// }
////
//// export interface TickOptions {
//// callback: (this: Scale, tickValue: number | string) => string | string[] | number | number[] | null | undefined;
//// }
////
//// export interface CoreScaleOptions {
//// opt: boolean;
//// }
////
//// export interface Scale<O extends CoreScaleOptions = CoreScaleOptions> {
//// opts: O;
//// getLabelForValue(value: number): string;
//// }
// @filename: options.ts
//// import { Chart } from './index.esm';
////
//// const chart = new Chart({
//// options: {
//// callback(tickValue) {
//// /*a*/const value = this.getLabelForValue(tickValue as number);/*b*/
//// return '$' + value;
//// }
//// }
//// });
goTo.file("options.ts");
verify.noErrors();
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Extract Symbol",
actionName: "function_scope_0",
actionDescription: "Extract to inner function in method 'callback'",
newContent:
`TODO`
}); Feels like another node reuse problem, kinda like I fixed in #48490. |
No, different problem. The formatter doesn't seem to like synthesized nodes/arrays, which can happen since code fixes and refactors generate code (which means we may create import nodes, for example), which is then formatted before being returned. |
This issue comes from crash dumps in telemetry. We've tried to de-duplicate issues on a best-effort basis, comparing the sequence of methods called and the command requested while ignoring line numbers.
TypeScript version prefix: 4.7.2
VSCode version: 1.68.0-insider
Command requested: getCodeFixes
Hitting sessions: 847
Five line hash: 8bf0402bbe40ec04bbb0073872731305
Stack:
The text was updated successfully, but these errors were encountered: