Skip to content
View cendevweb's full-sized avatar
🧑‍💻
Probably coding with some music on...
🧑‍💻
Probably coding with some music on...

Block or report cendevweb

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. SpreadWithTypeofGuard SpreadWithTypeofGuard
    1
    const val1 = {
    2
        test1: 1,
    3
        test2: 2,
    4
    }
    5
    const result = { ...(typeof val1 === 'object' ? val1 : {})}
  2. Function overload Function overload
    1
    // Overload signatures
    2
    function greet(person: string): string;
    3
    function greet(persons: string[]): string[];
    4
    
                  
    5
    // Implementation signature
  3. proxyValidator proxyValidator
    1
     const validator = {
    2
       set: function(obj, prop, value) {
    3
         if (prop === 'age' && typeof value !== 'number') {
    4
           throw new Error('Age must be a number');
    5
         }
  4. lookup table lookup table
    1
    const I18N_PREFIX = 'form.formValidation';
    2
    export enum RequestStatus {
    3
        PENDING = 'pending',
    4
        SUCCESS = 'success',
    5
        ERROR = 'error',