mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Downgrade TypeScript
This commit is contained in:
+2
-2
@@ -51,7 +51,7 @@ export interface Fiber {
|
||||
|
||||
// The ref last used to attach this node.
|
||||
// I'll avoid adding an owner field for prod and model that as functions.
|
||||
ref: null | (((handle: unknown) => void) & { _stringRef: string | null | undefined }) | RefObject;
|
||||
ref: null | (((handle: any) => void) & { _stringRef: string | null | undefined }) | RefObject;
|
||||
|
||||
// Input is the data coming into process this fiber. Arguments. Props.
|
||||
pendingProps: any; // This type will be more specific once we overload the tag.
|
||||
@@ -64,7 +64,7 @@ export interface Fiber {
|
||||
memoizedState: any;
|
||||
|
||||
// A linked-list of contexts that this fiber depends on
|
||||
firstContextDependency: ContextDependency<unknown> | null;
|
||||
firstContextDependency: ContextDependency<any> | null;
|
||||
|
||||
// Bitfield that describes properties about the fiber and its subtree. E.g.
|
||||
// the AsyncMode flag indicates whether the subtree should be async-by-
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@ import { ReactContext } from './ReactTypes';
|
||||
export interface ContextDependency<T> {
|
||||
context: ReactContext<T>;
|
||||
observedBits: number;
|
||||
next: ContextDependency<unknown> | null;
|
||||
next: ContextDependency<any> | null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ export interface Reconciler<Instance, TextInstance, Container, PublicInstance> {
|
||||
): R;
|
||||
interactiveUpdates<A, B, R>(fn: (a: A, b: B) => R, a: A, b: B): R;
|
||||
flushInteractiveUpdates(): void;
|
||||
flushControlled(fn: () => unknown): void;
|
||||
flushControlled(fn: () => any): void;
|
||||
flushSync<A, R>(fn: (a: A) => R, a: A): R;
|
||||
|
||||
// Used to extract the return value from the initial render. Legacy API.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { Interaction } from './Tracking';
|
||||
export interface Batch {
|
||||
_defer: boolean;
|
||||
_expirationTime: ExpirationTime;
|
||||
_onComplete: () => unknown;
|
||||
_onComplete: () => any;
|
||||
_next: Batch | null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ export interface Update<State> {
|
||||
|
||||
tag: 0 | 1 | 2 | 3;
|
||||
payload: any;
|
||||
callback: (() => unknown) | null;
|
||||
callback: (() => any) | null;
|
||||
|
||||
next: Update<State> | null;
|
||||
nextEffect: Update<State> | null;
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://reactjs.org/
|
||||
// Definitions by: Nathan Bierema <https://github.com/Methuselah96>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
export { default } from './ReactFiberReconciler';
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ interface Deadline {
|
||||
|
||||
// Current virtual time
|
||||
export let nowImplementation = () => 0;
|
||||
export let scheduledCallback: ((deadline: Deadline) => unknown) | null = null;
|
||||
export let yieldedValues: Array<unknown> = [];
|
||||
export let scheduledCallback: ((deadline: Deadline) => any) | null = null;
|
||||
export let yieldedValues: Array<any> = [];
|
||||
|
||||
export function scheduleDeferredCallback(
|
||||
callback: (deadline: Deadline) => unknown,
|
||||
callback: (deadline: Deadline) => any,
|
||||
options?: { timeout: number },
|
||||
): number {
|
||||
scheduledCallback = callback;
|
||||
@@ -25,7 +25,7 @@ export function setNowImplementation(implementation: () => number): void {
|
||||
nowImplementation = implementation;
|
||||
}
|
||||
|
||||
export function flushAll(): Array<unknown> {
|
||||
export function flushAll(): Array<any> {
|
||||
yieldedValues = [];
|
||||
while (scheduledCallback !== null) {
|
||||
const cb = scheduledCallback;
|
||||
@@ -44,7 +44,7 @@ export function flushAll(): Array<unknown> {
|
||||
return yieldedValues;
|
||||
}
|
||||
|
||||
export function flushNumberOfYields(count: number): Array<unknown> {
|
||||
export function flushNumberOfYields(count: number): Array<any> {
|
||||
let didStop = false;
|
||||
yieldedValues = [];
|
||||
while (scheduledCallback !== null && !didStop) {
|
||||
@@ -69,11 +69,11 @@ export function flushNumberOfYields(count: number): Array<unknown> {
|
||||
return yieldedValues;
|
||||
}
|
||||
|
||||
export function yieldValue(value: unknown): void {
|
||||
export function yieldValue(value: any): void {
|
||||
yieldedValues.push(value);
|
||||
}
|
||||
|
||||
export function clearYields(): Array<unknown> {
|
||||
export function clearYields(): Array<any> {
|
||||
const values = yieldedValues;
|
||||
yieldedValues = [];
|
||||
return values;
|
||||
|
||||
Reference in New Issue
Block a user