Skip to content

Commit 934437b

Browse files
committed
chore: fix type errors, update copyright
1 parent c400039 commit 934437b

26 files changed

+33
-30
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2024 the oak authors
3+
Copyright (c) 2018-2025 the oak authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ for each modules is the best guide on the usage of the APIs:
6868

6969
---
7070

71-
Copyright 2018 - 2024 the oak authors. All rights reserved. MIT License.
71+
Copyright 2018 - 2025 the oak authors. All rights reserved. MIT License.

assert.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
import { assert } from "./assert.ts";
4-
import { assertEquals } from "./deps_test.ts";
5-
import { isHttpError } from "./http_errors.ts";
4+
import { assertEquals, assertInstanceOf } from "./deps_test.ts";
5+
import { HttpError, isHttpError } from "./http_errors.ts";
66
import { Status } from "./status.ts";
77

88
Deno.test({
@@ -34,6 +34,7 @@ Deno.test({
3434
try {
3535
assert(false, "This is a custom message.");
3636
} catch (error) {
37+
assertInstanceOf(error, Error);
3738
assertEquals(error.message, "This is a custom message.");
3839
}
3940
},
@@ -45,6 +46,7 @@ Deno.test({
4546
try {
4647
assert(false, "This is a custom message.", Status.NotFound);
4748
} catch (error) {
49+
assertInstanceOf(error, HttpError);
4850
assertEquals(error.status, 404);
4951
assertEquals(error.expose, true);
5052
}
@@ -59,6 +61,7 @@ Deno.test({
5961
expose: false,
6062
});
6163
} catch (error) {
64+
assertInstanceOf(error, HttpError);
6265
assertEquals(error.expose, false);
6366
}
6467
},

assert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
import { createHttpError, type HttpErrorOptions } from "./http_errors.ts";
44
import { type ErrorStatus, Status } from "./status.ts";

content_disposition.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
import { getFilename } from "./content_disposition.ts";
44
import { assertEquals } from "./deps_test.ts";

cookie_map.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
import {
44
assert,

cookie_map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
/**
44
* Provides a iterable map interfaces for managing cookies server side.

deps_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
/**
44
* Dependencies used only by tests.

form_data.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
import { parse } from "./form_data.ts";
44
import { assertEquals } from "./deps_test.ts";

form_data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018-2024 the oak authors. All rights reserved. MIT license.
1+
// Copyright 2018-2025 the oak authors. All rights reserved. MIT license.
22

33
/**
44
* The ability to parse a request body into {@linkcode FormData} when not

0 commit comments

Comments
 (0)