it may be a big mandela effect, but afaik this should do it
export type Dependency =
| {
groupId: string
artifactId: string
}
| {
repoId: string
repoUrl: string
groupId: string
artifactId: string
}
meaning, {groupId: '', artifactId: ''} should be valid, {repoId: '', repoUrl: '', groupId: '', artifactId: ''} should be valid too, but {repoId: '', groupId: '', artifactId: ''} should not be valid, bc the repoUrl is missing, and viceversa. but for some reason, this is valid, no errors
const x: Dependency = {repoUrl: '', groupId: '', artifactId: ''}
why? is that normal? i already restarted the TS lsp, it depends on some setting in tsconfig.json? if not, how can i achieve that then?