Skip to content

Conversation

@mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jun 3, 2025

A bit of a not-so-dry run for ts-migrate, wanted to see what it would look like.

tsc errors post execution is about 76, which is pretty manageable. If we all decide this is a positive step forward I don't mind fixing the 76 errors.

Main benefits with this approach:

  • this changes @ts-ignore to @ts-expect-error with specificity about the error that's expected (providing super useful metadata in-code). @ts-expect-error will fail once the issue is fixed, forcing us to clean up those comments. With @ts-ignore, it's common to keep those messages around even when they've been addressed, which isn't good. With the extra metadata, it's easier to grep for certain types of errors for instance, which is positive.
  • all files auto-migrate to tx/tsx makes it such that you can type a single function in a large module withouth having the burden of migrating the module atomically. This makes it easier for PRs that are touching areas of the codebase to take on typing a single function without the full burden of migrating the module.

NOTE:

Details ->

> [email protected] type
> tsc --noEmit

plugins/legacy-plugin-chart-partition/test/OptionDescription.test.tsx(44,53): error TS1005: '}' expected.
plugins/legacy-plugin-chart-partition/test/OptionDescription.test.tsx(44,62): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(277,57): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(277,81): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`?
src/components/Datasource/DatasourceEditor.tsx(294,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(305,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(347,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(380,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(392,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(926,55): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(939,55): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(949,53): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1023,55): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1032,55): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1053,53): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1064,53): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1176,67): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1211,69): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1229,65): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1431,59): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1431,87): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`?
src/components/Datasource/DatasourceEditor.tsx(1433,61): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1444,61): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1452,61): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1468,58): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1482,58): error TS1005: '}' expected.
src/components/Datasource/DatasourceEditor.tsx(1494,58): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(112,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(112,82): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(112,90): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(132,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(132,82): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(132,90): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(173,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(173,144): error TS1002: Unterminated string literal.
src/dashboard/components/Dashboard.test.tsx(174,22): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(174,65): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
src/dashboard/components/Dashboard.test.tsx(176,13): error TS17002: Expected corresponding JSX closing tag for 'PluginContext.Provider'.
src/dashboard/components/Dashboard.test.tsx(177,9): error TS1005: ',' expected.
src/dashboard/components/Dashboard.test.tsx(177,34): error TS1109: Expression expected.
src/dashboard/components/Dashboard.test.tsx(224,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(224,91): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(269,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(269,144): error TS1002: Unterminated string literal.
src/dashboard/components/Dashboard.test.tsx(270,22): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(270,59): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
src/dashboard/components/Dashboard.test.tsx(272,13): error TS17002: Expected corresponding JSX closing tag for 'PluginContext.Provider'.
src/dashboard/components/Dashboard.test.tsx(273,9): error TS1005: ',' expected.
src/dashboard/components/Dashboard.test.tsx(273,34): error TS1109: Expression expected.
src/dashboard/components/Dashboard.test.tsx(292,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(292,144): error TS1002: Unterminated string literal.
src/dashboard/components/Dashboard.test.tsx(293,22): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(293,59): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
src/dashboard/components/Dashboard.test.tsx(295,13): error TS17002: Expected corresponding JSX closing tag for 'PluginContext.Provider'.
src/dashboard/components/Dashboard.test.tsx(296,9): error TS1005: ',' expected.
src/dashboard/components/Dashboard.test.tsx(296,34): error TS1109: Expression expected.
src/dashboard/components/Dashboard.test.tsx(315,57): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(315,144): error TS1002: Unterminated string literal.
src/dashboard/components/Dashboard.test.tsx(316,22): error TS1005: '}' expected.
src/dashboard/components/Dashboard.test.tsx(316,59): error TS1382: Unexpected token. Did you mean `{'>'}` or `>`?
src/dashboard/components/Dashboard.test.tsx(318,13): error TS17002: Expected corresponding JSX closing tag for 'PluginContext.Provider'.
src/dashboard/components/Dashboard.test.tsx(319,9): error TS1005: ',' expected.
src/dashboard/components/Dashboard.test.tsx(319,34): error TS1109: Expression expected.
src/dashboard/components/gridComponents/Tabs.tsx(427,104): error TS1005: '}' expected.
src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx(1007,89): error TS1003: Identifier expected.
src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx(1011,93): error TS1003: Identifier expected.
src/explore/components/controls/CollectionControl/index.tsx(126,89): error TS1003: Identifier expected.
src/explore/components/controls/ColorPickerControl.tsx(119,61): error TS1005: '}' expected.
src/explore/components/controls/ColorPickerControl.tsx(121,61): error TS1005: '}' expected.
src/explore/components/controls/DatasourceControl/index.tsx(469,88): error TS1005: '}' expected.
src/explore/components/controls/FixedOrMetricControl/index.tsx(120,98): error TS1003: Identifier expected.
src/explore/components/controls/FixedOrMetricControl/index.tsx(120,110): error TS1005: '}' expected.
src/explore/components/controls/FixedOrMetricControl/index.tsx(121,20): error TS1005: '...' expected.
src/explore/components/controls/FixedOrMetricControl/index.tsx(126,20): error TS1005: '...' expected.
src/explore/components/controls/FixedOrMetricControl/index.tsx(138,17): error TS1003: Identifier expected.
src/explore/components/DatasourcePanel/index.tsx(334,79): error TS1005: '}' expected.

@korbit-ai
Copy link

korbit-ai bot commented Jun 3, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants