- Delete old Vite+Svelte frontend - Initialize new SvelteKit project with TypeScript - Configure Tailwind CSS v4 + DaisyUI - Implement JWT authentication with auto-refresh - Create login page with form validation (Zod) - Add protected route guards - Update Docker configuration for single-stage build - Add E2E tests with Playwright (6/11 passing) - Fix Svelte 5 reactivity with $state() runes Known issues: - 5 E2E tests failing (timing/async issues) - Token refresh implementation needs debugging - Validation error display timing
14 lines
706 B
JavaScript
14 lines
706 B
JavaScript
// https://stackoverflow.com/a/46971044/970769
|
|
// "Breaking changes in Typescript 2.1"
|
|
// "Extending built-ins like Error, Array, and Map may no longer work."
|
|
// "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
|
|
// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
export default class ParseError extends Error {
|
|
constructor(code) {
|
|
super(code)
|
|
// Set the prototype explicitly.
|
|
// Any subclass of FooError will have to manually set the prototype as well.
|
|
Object.setPrototypeOf(this, ParseError.prototype)
|
|
this.name = this.constructor.name
|
|
}
|
|
} |