Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/FlawedContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { Result } from "../Result"
export interface FlawedContent extends Error {
status: 400
type: "flawed content"
content: Flaw
content: Flaw | false
error?: string
}

export function flawedContent(content: Flaw, error?: string): FlawedContent {
export function flawedContent(content: Flaw | false, error?: string): FlawedContent {
return { status: 400, type: "flawed content", content, error }
}

Expand All @@ -19,7 +19,7 @@ export namespace FlawedContent {
typeof value == "object" &&
value.status == 400 &&
value.type == "flawed content" &&
Flaw.is(value.content) &&
(Flaw.is(value.content) || value.content === false) &&
(value.error == undefined || typeof value.error == "string") &&
Result.is(value)
)
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
enabled: true,
all: true,
cleanOnRerun: true,
thresholds: { statements: 80, branches: 90, functions: 65, lines: 80 },
thresholds: { statements: 80, branches: 85, functions: 65, lines: 80 },
},
globals: true,
include: ["**/*.spec.[tj]s"],
Expand Down