aboutsummaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-05-03 08:18:58 +0200
committerGitHub <[email protected]>2023-05-03 08:18:58 +0200
commitede6ffac383a853c12b7a47cebbb031ba80627aa (patch)
tree92f0632b03b9920c4e880fff2dd711a1142ed393 /test/scripts
parent1cadfb97856da17047fcb5dcb504c3418eeed145 (diff)
downloadfaker-ede6ffac383a853c12b7a47cebbb031ba80627aa.tar.xz
faker-ede6ffac383a853c12b7a47cebbb031ba80627aa.zip
test: prepare test sources for strict mode (#2107)
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/apidoc/signature.example.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts
index 97db90c8..6bb835c1 100644
--- a/test/scripts/apidoc/signature.example.ts
+++ b/test/scripts/apidoc/signature.example.ts
@@ -94,7 +94,7 @@ export class SignatureTest {
* @param b The string parameter.
*/
optionalStringParamMethod(b?: string): number {
- return +b;
+ return b ? 0 : 1;
}
/**
@@ -114,7 +114,7 @@ export class SignatureTest {
* @param c The boolean parameter.
*/
multiParamMethod(a: number, b?: string, c: boolean = true): number {
- return c ? a : +b;
+ return c ? a : b ? 0 : 1;
}
/**
@@ -143,7 +143,7 @@ export class SignatureTest {
excludes?: ReadonlyArray<AlphaNumericChar>;
}
): string {
- return value + options.format;
+ return options?.format ?? value;
}
/**
@@ -195,7 +195,7 @@ export class SignatureTest {
*/
e: LiteralUnion<'a' | 'b'>;
}): number {
- return options.c ? options.a : +options.b;
+ return options.a;
}
/**