type User = {
    id: string;
    name: string;
}

function getUser(id: User["id"]) {
    return {id, name: "Jim Carter"};
}

console.log(getUser("u1"))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: