We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial<>
This isn't possible. Each key of grouped and its value must exist:
grouped
const grouped = Object.groupBy( [ { name: "foo", value: 20, }, { name: "bar", value: 60, }, { name: "bar", value: 40, } ], ({name}) => name, ); for (const group of Object.values(grouped)) { group.forEach(console.log) // 'group' is possibly 'undefined'.(18048) }
https://www.typescriptlang.org/play/?checkJs=true&allowJs=true&target=99&types=%5B%22node%22%5D#code/FAAhGMHsDsGcBcQHMBOkCuAHApgExALwgDyARgFbbjwB0qGmAQgJ4AUoYIA2h55wN68+w6AEMAttgBcIAEQAzSJFkAaIcM4A3UQBt00kACYADGo1gAvmfODzIiQdmlRKVevPa9BgGyn3l6w1bO04xSRknFzcQrV19GQAWPzsLIQBdQJBWfjDsCwBKQgA+EFzrfIBuDkUULKg4RHosEEh5EgoqWk99WFYmnFx8wuCwfpoagFFRcAALVnrYSB1sGh1IJHyhAHotkAByfr2QAEtYEExIWFhj0h1mffRoXGx5Y+g8PZpWAEYADmMEr9NpYgA
Additional comments may be found on microsoft/TypeScript#47171 (comment)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This isn't possible. Each key of
grouped
and its value must exist:https://www.typescriptlang.org/play/?checkJs=true&allowJs=true&target=99&types=%5B%22node%22%5D#code/FAAhGMHsDsGcBcQHMBOkCuAHApgExALwgDyARgFbbjwB0qGmAQgJ4AUoYIA2h55wN68+w6AEMAttgBcIAEQAzSJFkAaIcM4A3UQBt00kACYADGo1gAvmfODzIiQdmlRKVevPa9BgGyn3l6w1bO04xSRknFzcQrV19GQAWPzsLIQBdQJBWfjDsCwBKQgA+EFzrfIBuDkUULKg4RHosEEh5EgoqWk99WFYmnFx8wuCwfpoagFFRcAALVnrYSB1sGh1IJHyhAHotkAByfr2QAEtYEExIWFhj0h1mffRoXGx5Y+g8PZpWAEYADmMEr9NpYgA
Additional comments may be found on microsoft/TypeScript#47171 (comment)
The text was updated successfully, but these errors were encountered: