From 82a345dfc58fa5fa8db5cad4fdd9405f7c19ce6b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 1 Oct 2019 10:37:32 -0700 Subject: [PATCH] 3 more fixes for TS 3.7 (#38777) * 3 more fixes for TS 3.7 lyricist: patch tests until TS fixes Promise.all react-relay: fix lint react-sortable-tree: upgrade react-dnd dependency The change to lyricist is just a workaround for now. React-sortable-tree's upgrade is the same as other dependents of react-dnd that I did yesterday. * More compatible workaround for lyricist --- types/lyricist/lyricist-tests.ts | 2 +- types/react-relay/test/react-relay-tests.tsx | 2 +- types/react-sortable-tree/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/lyricist/lyricist-tests.ts b/types/lyricist/lyricist-tests.ts index 7320cac4c5..1229dbfea6 100644 --- a/types/lyricist/lyricist-tests.ts +++ b/types/lyricist/lyricist-tests.ts @@ -23,7 +23,7 @@ Promise const artistByName: Artist = results[2]; const searchResult: SearchResult[] = results[3]; const song: Song = results[4]; - const songsByArtist: SongByArtist[] = results[5]; + const songsByArtist: SongByArtist[] = results[5] as SongByArtist[]; console.log('album', album.name); console.log('artist', artist.name); diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index aac78077da..f885d00827 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -647,7 +647,7 @@ requestSubscription( const notification = !!rootField ? rootField.getLinkedRecord('notification') : null; // Add it to a connection const viewer = store.getRoot().getLinkedRecord('viewer'); - const notifications = ConnectionHandler.getConnection(viewer!, 'notifications'); + const notifications = ConnectionHandler.getConnection(viewer, 'notifications'); const edge = ConnectionHandler.createEdge( store, notifications!, diff --git a/types/react-sortable-tree/package.json b/types/react-sortable-tree/package.json index 41eb88b180..3f6df22aa7 100644 --- a/types/react-sortable-tree/package.json +++ b/types/react-sortable-tree/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "react-dnd": "5 || 6 || 7" + "react-dnd": "^9.3.1" } }