Skip to content

Conversation

@kaarleol
Copy link
Collaborator

I just can't find a way around the ts error

@kaarleol kaarleol force-pushed the mandatory-reference branch from 45b1d8d to c405f2f Compare November 24, 2024 18:54
@kaarleol kaarleol marked this pull request as draft November 24, 2024 18:55

// new references have rowState = 'new', old ones don't have a rowState and references that will be deleted have rowstate='removed'
// so checking the update has at least one reference that's not queued for removal
let nonRemovedReference = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const nonRemovedReferences = references.some(ref =>!ref.rowState || ref.rowState === 'removed')

@ShootingStar91
Copy link
Contributor

@kaarleol I think the ts error is due to the path alias ('@/backendTypes') in import.

Notice how it is backends tsc that fails? That is because backend code uses some files from frontend, but it doesn't know about frontend path aliases. That's why you can't use path aliases in those files, you must use relative paths. For the same reason you shouldn't import other frontend files into these shared files. I think I wrote a comment about these limitations into the backendTypes file, but the file/folder structure is now a bit different so it's less obvious to see it.

I'll try to make a fix to the entire shared directory / filenames later, and I'll make it a PR so your group can approve and merge it. There's a couple very confusing things that I left there.

@kaarleol kaarleol force-pushed the mandatory-reference branch from c63ffa4 to 242e37c Compare December 1, 2024 18:39
@kaarleol kaarleol marked this pull request as ready for review December 1, 2024 22:27
Copy link
Collaborator

@iritmaximus iritmaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iritmaximus iritmaximus merged commit d321a7a into main Dec 2, 2024
4 checks passed
@iritmaximus iritmaximus deleted the mandatory-reference branch December 2, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants