diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7795566eeeeadd..d5519e06676a3a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1521,6 +1521,7 @@ /types/diva.js/ @JRegimbal /types/django-bananas/ @eliassjogreen /types/djv/ @ffflorian +/types/dkfds/ @chcederquist /types/dkim-signer/ @dex4er /types/dlv/ @ryansonshine /types/dmx/ @BendingBender @@ -3943,6 +3944,7 @@ /types/karma-firefox-launcher/ @peterblazejewicz /types/karma-fixture/ @evictor @afshawnlotfi /types/karma-html-detailed-reporter/ @peterblazejewicz +/types/karma-html2js-preprocessor/ @niksy /types/karma-ie-launcher/ @peterblazejewicz /types/karma-image-snapshot/ @peterblazejewicz /types/karma-jasmine/ @michelsalib @peterblazejewicz @@ -4194,7 +4196,6 @@ /types/leb128/ @remcohaszing /types/ledgerhq__hw-transport-u2f/ @danwbyrne /types/legal-eagle/ @j-f1 -/types/leo-profanity/ @jackhumphries9 /types/lerna-alias/ @ecraig12345 /types/lerna-get-packages/ @LogvinovLeon /types/lerna__child-process/ @donmahallem @@ -4832,7 +4833,7 @@ /types/metrostations/ @peterblazejewicz /types/mfiles/ @avonwyss /types/mg-api-js/ @kadensharpin -/types/micro-cors/ @CallumDenby @moonchanyong +/types/micro-cors/ @moonchanyong /types/micro-events/ @AlexanderSychev /types/micromatch/ @vemoo /types/micromatch/v2/ @glen-84 @@ -7394,7 +7395,7 @@ /types/spark-md5/ @bastienmoulia @ffflorian /types/sparkpost/ @geoffreak @bondz @vvu /types/sparkpost/v1/ @geoffreak -/types/sparql-http-client/ @tpluscode @ludovicm67 +/types/sparql-http-client/ @tpluscode @ludovicm67 @giacomoronconiobda /types/sparqljs/ @AlexeyMz @rubensworks /types/sparqljs/v2/ @AlexeyMz /types/sparse-bitfield/ @BendingBender @@ -7689,7 +7690,6 @@ /types/system-service/ @leocwlam /types/system-sleep/ @ArthurKa /types/system-task/ @leocwlam -/types/systemjs/ @jolyndenning /types/systemjs/v0/ @ludohenin @NathanWalker @GiedriusGrabauskas @aluanhaddad /types/table-resolver/ @junalmeida /types/tableau/ @protip diff --git a/types/react/index.d.ts b/types/react/index.d.ts index c8933b3cf95add..b3bab603f01a06 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -1926,7 +1926,31 @@ declare namespace React { reducer: (state: State, action: Action) => State, ): [State, (action: Action) => void]; - export type Usable = PromiseLike | Context; + interface UntrackedReactPromise extends PromiseLike { + status?: void; + } + + export interface PendingReactPromise extends PromiseLike { + status: "pending"; + } + + export interface FulfilledReactPromise extends PromiseLike { + status: "fulfilled"; + value: T; + } + + export interface RejectedReactPromise extends PromiseLike { + status: "rejected"; + reason: unknown; + } + + export type ReactPromise = + | UntrackedReactPromise + | PendingReactPromise + | FulfilledReactPromise + | RejectedReactPromise; + + export type Usable = ReactPromise | Context; export function use(usable: Usable): T; diff --git a/types/react/ts5.0/index.d.ts b/types/react/ts5.0/index.d.ts index ca6c833005fc3d..9433beaaef2a49 100644 --- a/types/react/ts5.0/index.d.ts +++ b/types/react/ts5.0/index.d.ts @@ -1925,7 +1925,31 @@ declare namespace React { reducer: (state: State, action: Action) => State, ): [State, (action: Action) => void]; - export type Usable = PromiseLike | Context; + interface UntrackedReactPromise extends PromiseLike { + status?: void; + } + + export interface PendingReactPromise extends PromiseLike { + status: "pending"; + } + + export interface FulfilledReactPromise extends PromiseLike { + status: "fulfilled"; + value: T; + } + + export interface RejectedReactPromise extends PromiseLike { + status: "rejected"; + reason: unknown; + } + + export type ReactPromise = + | UntrackedReactPromise + | PendingReactPromise + | FulfilledReactPromise + | RejectedReactPromise; + + export type Usable = ReactPromise | Context; export function use(usable: Usable): T;