Skip to main content
TypeScript Code Completion Easy +10 XP

Interface Definition

Complete the interface.

TypeScriptFill in the blank
___ User {
    name: string;
    age: number;
}

Type the missing code

Show answer and explanation

Answer: interface

Interfaces in TypeScript define the shape of objects using the 'interface' keyword.

Hint: What keyword defines object shapes in TS?

What this challenge tests

Code Completion in TypeScript: interfaces, types.

Related challenges