aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-10-10 17:07:01 +0200
committerGitHub <[email protected]>2023-10-10 17:07:01 +0200
commit6cb5aa25f676c7f43fd543e1738e71f54ea5fc6f (patch)
tree6c8fb1992bb7709192033b8b901daad3ecd9abb7 /scripts
parent350dfbf2c57f023a78567da60bf4792ebd1a41f7 (diff)
downloadfaker-6cb5aa25f676c7f43fd543e1738e71f54ea5fc6f.tar.xz
faker-6cb5aa25f676c7f43fd543e1738e71f54ea5fc6f.zip
infra(unicorn): explicit-length-check (#2455)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidoc/signature.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts
index b7c23842..fe11c78d 100644
--- a/scripts/apidoc/signature.ts
+++ b/scripts/apidoc/signature.ts
@@ -64,7 +64,7 @@ export async function analyzeSignature(
// Generate usage section
let signatureTypeParametersString = '';
- if (signatureTypeParameters.length !== 0) {
+ if (signatureTypeParameters.length > 0) {
signatureTypeParametersString = `<${signatureTypeParameters.join(', ')}>`;
}
@@ -207,7 +207,7 @@ async function typeToText(type_?: Type, short = false): Promise<string> {
.join(' | ');
case 'reference':
- if (!type.typeArguments || !type.typeArguments.length) {
+ if (!type.typeArguments || type.typeArguments.length === 0) {
const reflection = type.reflection as DeclarationReflection | undefined;
const reflectionType = reflection?.type;
if (