Practice question from Advanced Typescript

Complete the type guard function:

function is____<T>(x: any): x is ____<T> {
    return x !== null && typeof x === 'object';
}

Answer

Dictionary

Explanation

This creates a type guard function to check if a value is a dictionary-like object

More questions from Quick: Advanced Typescript