hunk.code_window:   return (state.promise = (async (): AsyncResult<T> => {
       let result!: AnimationResult
       const defaultProps: SpringDefaultProps<T> = {}
       mergeDefaultProps(defaultProps, props)
       // The `onRest` prop is for `runAsync` to call.
       defaultProps.onRest = undefined
       const { callId, onRest } = props
       const throwInvalidated = () => {
         // Prevent further animation if cancelled.
  
hunk.labels: keep keep keep keep replace replace replace replace keep keep keep keep
hunk.after_edit:     mergeDefaultProps(defaultProps, props, ['onRest'])
  
hunk.file_path: packages/core/src/runAsync.ts
hunk.type: replace
file: import { Remap, Any } from '@alloc/types'
  
  export * from '@alloc/types'
  
  /** Ensure each type of `T` is an array */
  export type Arrify<T> = [T, T] extends [infer T, infer DT]
    ? DT extends ReadonlyArray<any>
      ? Array<DT[number]> extends DT
        ? ReadonlyArray<T extends ReadonlyArray<infer U> ? U : T>
        : DT
      : ReadonlyArray<T extends ReadonlyArray<infer U> ? U : T>
    : never
  
  /** Override the property types of `A` with `B` and merge any new properties */
  export type Merge<A, B> = Remap<
    { [P in keyof A]: P extends keyof B ? B[P] : A[P] } & Omit<B, keyof A>
  >
  
  /** Return the keys of `T` with values that are assignable to `U` */
  export type AssignableKeys<T, U> = T extends object
    ? U extends object
      ? {
          [P in Extract<keyof T, keyof U>]: T[P] extends U[P] ? P : never
        }[Extract<keyof T, keyof U>]
      : never
    : never
  
  /** Better type errors for overloads with generic types */
  export type Constrain<T, U> = [T] extends [Any] ? U : [T] extends [U] ? T : U
  