Remote functions doc & types tweak#14653
Conversation
…sues() ?? []" in userland)
|
|
|
||
| <div class="preview"> | ||
| <h2>{createPost.fields.title.value()}</h2> | ||
| <div>{@html render(createPost.fields.content.value())}</div> |
There was a problem hiding this comment.
this is supposed to be turning markdown to HTML — without it, it would just display the exact thing that's already in the <textarea>
There was a problem hiding this comment.
renderMd is ugly!
I just don't know how to say: It's not from svelte
| /** Set the values that will be submitted */ | ||
| set(input: T): T; | ||
| /** Validation issues, if any */ | ||
| issues(): RemoteFormIssue[] | undefined; |
There was a problem hiding this comment.
i don't think we want this! at the moment !field.issues() serves as a proxy for 'is valid', which would no longer be true if it always returned an array
There was a problem hiding this comment.
I see.
Maybe adding in docs ?? [] then?
There was a problem hiding this comment.
see #14628 (comment) — you can use it without the ?? [], it causes squigglies at the moment but we can fix that
…void "issues() ?? []" in userland)" This reverts commit c356bed.
With the type update, userland can do: (like in the doc)
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits