Skip to content

Instantly share code, notes, and snippets.

@DanielHoffmann
Created July 18, 2023 12:13
Show Gist options
  • Save DanielHoffmann/13acb0f8a56d3fee6af02c073453692d to your computer and use it in GitHub Desktop.
Save DanielHoffmann/13acb0f8a56d3fee6af02c073453692d to your computer and use it in GitHub Desktop.
type A = {
a: string
b: string
}
const c = {
a: 'a',
b: 'b',
c: 'c'
}
const a: A = c
Object.entries(a).forEach(([key, value]) => {
if (key in a) {
console.log(key)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment