diff --git a/types/nodegit/nodegit-tests.ts b/types/nodegit/nodegit-tests.ts index 4ed8967ba98482..99f4c290563751 100644 --- a/types/nodegit/nodegit-tests.ts +++ b/types/nodegit/nodegit-tests.ts @@ -226,3 +226,9 @@ Git.Clone("repo_url", "local_path", cloneOptions).then(repoClone => { // Use Repo repoClone.cleanup(); }); + +// Test the Reference.TYPE enum values +Git.Reference.TYPE.INVALID; // $ExpectType TYPE.INVALID +Git.Reference.TYPE.DIRECT; // $ExpectType TYPE.DIRECT +Git.Reference.TYPE.SYMBOLIC; // $ExpectType TYPE.SYMBOLIC +Git.Reference.TYPE.ALL; // $ExpectType TYPE.ALL diff --git a/types/nodegit/reference.d.ts b/types/nodegit/reference.d.ts index 8e2001c5a8eaf7..d7fafd0c3bbf78 100644 --- a/types/nodegit/reference.d.ts +++ b/types/nodegit/reference.d.ts @@ -5,8 +5,12 @@ import { Repository } from "./repository"; export namespace Reference { const enum TYPE { INVALID = 0, + DIRECT = 1, + /** @deprecated Use {@link DIRECT} instead. */ OID = 1, SYMBOLIC = 2, + ALL = 3, + /** @deprecated Use {@link ALL} instead. */ LISTALL = 3, } diff --git a/types/react/experimental.d.ts b/types/react/experimental.d.ts index 912284933a0761..e68cb1fc739bdd 100644 --- a/types/react/experimental.d.ts +++ b/types/react/experimental.d.ts @@ -214,4 +214,19 @@ declare module "." { export interface FragmentProps { ref?: Ref | undefined; } + + // @enableActivity + export interface ActivityProps { + /** + * @default "visible" + */ + mode?: + | "hidden" + | "visible" + | undefined; + children: ReactNode; + } + + /** */ + export const unstable_Activity: ExoticComponent; } diff --git a/types/react/test/experimental.tsx b/types/react/test/experimental.tsx index 30f4e583373061..302766851d32bf 100644 --- a/types/react/test/experimental.tsx +++ b/types/react/test/experimental.tsx @@ -284,3 +284,20 @@ function fragmentRefTest() {
; } + +// @enableActivity +function activityTest() { + const Activity = React.unstable_Activity; + + ; + ; + ; + ; + // @ts-expect-error -- Forgot children + ; + ; +} diff --git a/types/react/ts5.0/experimental.d.ts b/types/react/ts5.0/experimental.d.ts index 912284933a0761..e68cb1fc739bdd 100644 --- a/types/react/ts5.0/experimental.d.ts +++ b/types/react/ts5.0/experimental.d.ts @@ -214,4 +214,19 @@ declare module "." { export interface FragmentProps { ref?: Ref | undefined; } + + // @enableActivity + export interface ActivityProps { + /** + * @default "visible" + */ + mode?: + | "hidden" + | "visible" + | undefined; + children: ReactNode; + } + + /** */ + export const unstable_Activity: ExoticComponent; } diff --git a/types/react/ts5.0/test/experimental.tsx b/types/react/ts5.0/test/experimental.tsx index 62bf0737c1231d..8266e73c3a6529 100644 --- a/types/react/ts5.0/test/experimental.tsx +++ b/types/react/ts5.0/test/experimental.tsx @@ -287,3 +287,20 @@ function fragmentRefTest() {
; } + +// @enableActivity +function activityTest() { + const Activity = React.unstable_Activity; + + ; + ; + ; + ; + // @ts-expect-error -- Forgot children + ; + ; +}