Update typescript to 4.9.5
Reviewed By: passy Differential Revision: D46068908 fbshipit-source-id: 4c1ffff8690eec5a10c67d6c5d1aacf224e0f0d4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d6b852d435
commit
fda21e96e8
@@ -237,7 +237,7 @@ export class DataSource<T extends any, KeyType = never> {
|
||||
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,
|
||||
);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -32,7 +32,7 @@ import {theme} from '../theme';
|
||||
const {Item, SubMenu} = Menu;
|
||||
const {Option} = Select;
|
||||
|
||||
export function tableContextMenuFactory<T>(
|
||||
export function tableContextMenuFactory<T extends object>(
|
||||
dataView: _DataSourceView<T, T[keyof T]>,
|
||||
dispatch: DataTableDispatch<T>,
|
||||
selection: Selection,
|
||||
@@ -282,7 +282,7 @@ function friendlyColumnTitle(column: DataTableColumn<any>): string {
|
||||
return toFirstUpper(name);
|
||||
}
|
||||
|
||||
function defaultOnCopyRows<T>(
|
||||
function defaultOnCopyRows<T extends object>(
|
||||
items: T[],
|
||||
visibleColumns: DataTableColumn<T>[],
|
||||
) {
|
||||
|
||||
@@ -104,7 +104,7 @@ type TableRowProps<T> = {
|
||||
style?: CSSProperties;
|
||||
};
|
||||
|
||||
export const TableRow = memo(function TableRow<T>({
|
||||
export const TableRow = memo(function TableRow<T extends object>({
|
||||
record,
|
||||
itemIndex,
|
||||
highlighted,
|
||||
@@ -155,7 +155,7 @@ export const TableRow = memo(function TableRow<T>({
|
||||
}
|
||||
});
|
||||
|
||||
export function renderColumnValue<T>(
|
||||
export function renderColumnValue<T extends object>(
|
||||
col: DataTableColumn<any>,
|
||||
record: T,
|
||||
highlighted: boolean,
|
||||
|
||||
@@ -102,7 +102,7 @@ export abstract class FlipperBasePlugin<
|
||||
Actions extends BaseAction,
|
||||
PersistedState,
|
||||
> extends Component<Props<PersistedState>, 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<S, A, P> {
|
||||
['constructor']: typeof FlipperPlugin;
|
||||
device: BaseDevice;
|
||||
|
||||
constructor(props: Props<P>) {
|
||||
@@ -252,10 +251,8 @@ export class FlipperPlugin<
|
||||
A extends BaseAction,
|
||||
P,
|
||||
> extends FlipperBasePlugin<S, A, P> {
|
||||
['constructor']: typeof FlipperPlugin;
|
||||
constructor(props: Props<P>) {
|
||||
super(props);
|
||||
// @ts-ignore constructor should be assigned already
|
||||
const {id} = this.constructor;
|
||||
this.subscriptions = [];
|
||||
const realClient = (this.realClient = props.target as Client);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user