Run ❯
Get your
own Node
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
// @ts-check /** * @param {{ firstName: string, lastName: string, age?: number }} person */ function greet(person) { return `Hello, ${person.firstName} ${person.lastName}`; } console.log(greet({ firstName: 'John', lastName: 'Doe' })); // The following would be a type error with @ts-check enabled: // greet({ firstName: 'Jane' });
Expected console output:
Hello, John Doe