diff --git a/desktop/flipper-plugin-core/src/data-source/DataSource.tsx b/desktop/flipper-plugin-core/src/data-source/DataSource.tsx index 9cc56bf8c..407ebe0bf 100644 --- a/desktop/flipper-plugin-core/src/data-source/DataSource.tsx +++ b/desktop/flipper-plugin-core/src/data-source/DataSource.tsx @@ -237,7 +237,7 @@ export class DataSource { if (this._recordsById.has(key)) { const existingValue = this._recordsById.get(key); console.warn( - `Tried to append value with duplicate key: ${key} (key attribute is ${this.keyAttribute}). Old/new values:`, + `Tried to append value with duplicate key: ${key} (key attribute is ${this.keyAttribute.toString()}). Old/new values:`, existingValue, value, ); diff --git a/desktop/flipper-plugin-core/src/plugin/Plugin.tsx b/desktop/flipper-plugin-core/src/plugin/Plugin.tsx index 407f5b782..6cdea873e 100644 --- a/desktop/flipper-plugin-core/src/plugin/Plugin.tsx +++ b/desktop/flipper-plugin-core/src/plugin/Plugin.tsx @@ -202,7 +202,7 @@ export class SandyPluginInstance extends BasePluginInstance { ); }, onMessage: (event, cb) => { - this.events.on('event-' + event, batched(cb)); + this.events.on(`event-${event.toString()}`, batched(cb)); }, onUnhandledMessage: (cb) => { this.events.on('unhandled-event', batched(cb)); diff --git a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx index 516bd3f19..53e183fcd 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx @@ -32,7 +32,7 @@ import {theme} from '../theme'; const {Item, SubMenu} = Menu; const {Option} = Select; -export function tableContextMenuFactory( +export function tableContextMenuFactory( dataView: _DataSourceView, dispatch: DataTableDispatch, selection: Selection, @@ -282,7 +282,7 @@ function friendlyColumnTitle(column: DataTableColumn): string { return toFirstUpper(name); } -function defaultOnCopyRows( +function defaultOnCopyRows( items: T[], visibleColumns: DataTableColumn[], ) { diff --git a/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx b/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx index 92cd581a3..81211b105 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx @@ -104,7 +104,7 @@ type TableRowProps = { style?: CSSProperties; }; -export const TableRow = memo(function TableRow({ +export const TableRow = memo(function TableRow({ record, itemIndex, highlighted, @@ -155,7 +155,7 @@ export const TableRow = memo(function TableRow({ } }); -export function renderColumnValue( +export function renderColumnValue( col: DataTableColumn, record: T, highlighted: boolean, diff --git a/desktop/flipper-ui-core/src/plugin.tsx b/desktop/flipper-ui-core/src/plugin.tsx index 89a5ee71e..0611858f7 100644 --- a/desktop/flipper-ui-core/src/plugin.tsx +++ b/desktop/flipper-ui-core/src/plugin.tsx @@ -102,7 +102,7 @@ export abstract class FlipperBasePlugin< Actions extends BaseAction, PersistedState, > extends Component, State> { - abstract ['constructor']: any; + ['constructor']: any; static title: string | null = null; static category: string | null = null; static id: string = ''; @@ -219,7 +219,6 @@ export class FlipperDevicePlugin< A extends BaseAction, P, > extends FlipperBasePlugin { - ['constructor']: typeof FlipperPlugin; device: BaseDevice; constructor(props: Props

) { @@ -252,10 +251,8 @@ export class FlipperPlugin< A extends BaseAction, P, > extends FlipperBasePlugin { - ['constructor']: typeof FlipperPlugin; constructor(props: Props

) { super(props); - // @ts-ignore constructor should be assigned already const {id} = this.constructor; this.subscriptions = []; const realClient = (this.realClient = props.target as Client); diff --git a/desktop/package.json b/desktop/package.json index 17c7ee5e4..9ca95288d 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -103,7 +103,7 @@ "rimraf": "^3.0.2", "ts-jest": "^26.5.6", "ts-node": "^9.1.1", - "typescript": "^4.6.4" + "typescript": "^4.9.5" }, "homepage": "https://fbflipper.com/", "icon": "icon.png", diff --git a/desktop/yarn.lock b/desktop/yarn.lock index 7b19ce1b9..3786bb1f2 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -14864,10 +14864,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.6.4: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== ua-parser-js@^0.7.18: version "0.7.24"