Migrate `NativeQueryEditor` to TypeScript (#33102)
* Extend `ace-builds.d.ts` * Partially migrate to TypeScript Define component props and state types, add straightforward types * Add editor ref null checks * Add null checks for optional fn props * Fix missing types (simple) * Add straightforward ace editor null checks * Cast editor type on load * Fix `cardTagIdAtCursor` method * Fix `handleCursorChange` method * Fix missing arguments for ace's `setScrollMargin` * Use `Question` methods over properties * Use ace's completer types * Add editor null checks * Fix `setTableId` method * Fix `_updateSize` method * Fix `getCardTagCompletions` method * Fix `getSnippetCompletions` method * Fix autocompletion types * Fix scroll margin * Fix `fetchQuestion` type * Fix resizable box * Remove redundant editor null check * Fix incorrect type * Break down `OwnProps` * Fix `_lastAutoComplete` type * Minor fix * Minor fix * Avoid ace editor type casting * Add radix to `parseInt`
Showing
- frontend/src/metabase/query_builder/components/NativeQueryEditor/NativeQueryEditor.tsx 259 additions, 81 deletions...uilder/components/NativeQueryEditor/NativeQueryEditor.tsx
- frontend/src/metabase/query_builder/components/NativeQueryEditor/NativeQueryEditorPrompt/NativeQueryEditorPrompt.tsx 1 addition, 1 deletion...ditor/NativeQueryEditorPrompt/NativeQueryEditorPrompt.tsx
- frontend/src/types/ace-builds.d.ts 35 additions, 0 deletionsfrontend/src/types/ace-builds.d.ts
Loading
Please register or sign in to comment