persona-community-5/.pnpm-store/v3/files/a8/fb4fbffd5b6beb93870453e46d97b94089a566e5dde6eb1bce5f674cb62abc990d18acf32c6e443c9a6c53828e9b1d939a1eac4972559ac59a62e5a53bf66e
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

23 lines
615 B
Plaintext

import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str} from "../../compile/codegen"
import N from "../../compile/names"
const error: KeywordErrorDefinition = {
message: () => str`must NOT be present in response context`,
}
const def: CodeKeywordDefinition = {
keyword: "writeOnly",
schemaType: "boolean",
error,
code(cxt: KeywordCxt) {
if (cxt.schema !== true) return
const apiContext = _`(${N.this} && ${N.this}.apiContext)`
cxt.fail(_`${apiContext} === "response"`)
},
}
export default def