-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(archive,async,cli,csv,dotenv,encoding,expect,fmt,front-matter,fs,http,internal,log,net,path,semver,testing,text,webgpu,yaml): enable "exactOptionalPropertyTypes"
option
#5892
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5892 +/- ##
==========================================
- Coverage 96.32% 96.23% -0.10%
==========================================
Files 483 483
Lines 39063 39156 +93
Branches 5730 5772 +42
==========================================
+ Hits 37629 37683 +54
- Misses 1390 1429 +39
Partials 44 44 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm for strictness. Though, seeing as tests have to be modified, this seems like a breaking change. WDYT, @kt3k?
"exactOptionalPropertyTypes"
option"exactOptionalPropertyTypes"
option
fmt/bytes_test.ts
Outdated
assertEquals(format(-0.4, { locale: undefined } as object), "-0.4 B"); | ||
assertEquals(format(0.4, { locale: undefined } as object), "0.4 B"); | ||
assertEquals(format(1001, { locale: undefined } as object), "1 kB"); | ||
assertEquals(format(10.1, { locale: undefined } as object), "10.1 B"); | ||
assertEquals(format(1e30, { locale: undefined } as object), "1000000 YB"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertEquals(format(-0.4, { locale: undefined } as object), "-0.4 B"); | |
assertEquals(format(0.4, { locale: undefined } as object), "0.4 B"); | |
assertEquals(format(1001, { locale: undefined } as object), "1 kB"); | |
assertEquals(format(10.1, { locale: undefined } as object), "10.1 B"); | |
assertEquals(format(1e30, { locale: undefined } as object), "1000000 YB"); | |
assertEquals(format(-0.4, {}), "-0.4 B"); | |
assertEquals(format(0.4, {}), "0.4 B"); | |
assertEquals(format(1001, {}), "1 kB"); | |
assertEquals(format(10.1, {}), "10.1 B"); | |
assertEquals(format(1e30, {}), "1000000 YB"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've placed both { locale: undefined }
and {}
tests.
It seems to me that the changes in test cases are all caused by enabling |
Canary CI failed by denoland/deno#25369
|
"exactOptionalPropertyTypes"
option"exactOptionalPropertyTypes"
option
@@ -855,21 +856,25 @@ function main() { | |||
console.log(message); | |||
} | |||
|
|||
// TODO(petamoriken): Migrate `Deno.ServeTcpOptions | (Deno.ServeTcpOptions & Deno.TlsCertifiedKeyOptions)` in v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Deno.ServeTlsOptions
, but it was renamed to Deno.ServeTcpOptions
in Deno v2 (denoland/deno#25369), so I wrote directly this flat type 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related denoland/deno#25162
By including this PR, users will be able to use std modules without problems when the
“exactOptionalPropertyTypes”
option (which is recommended in tsconfig reference) is enabled.