aboutsummaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
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;
}
/**