This code currently breaks since userCache and database are not exported and used in the lined functions.
// Mock dependencies for the test
const userCache = new Map();
const database = { users: [{ id: 1, name: 'John', active: true }] };
// Functions marked with @inline
export /* @inline */ function getUser(id: number) {
return userCache.get(id) || database.users.find(u => u.id === id);
}
export /* @inline */ function getUserName(user: { name: string } | undefined) {
return user?.name || 'Unknown';
}
We should export these identifiers automatically in the first pass.
This code currently breaks since
userCacheanddatabaseare not exported and used in the lined functions.We should export these identifiers automatically in the first pass.