Skip to content

Commit

Permalink
Fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Dec 7, 2024
1 parent 89e8351 commit a3dd964
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import {
import { assertNever } from "@fern-api/core-utils";
import { AbstractGeneratedType } from "../AbstractGeneratedType";

type Property = {
interface Property {
name: string;
type: ts.TypeNode;
hasQuestionToken: boolean;
docs: string | undefined;
irProperty: ObjectProperty | undefined;
};
}

export class GeneratedObjectTypeImpl<Context extends BaseContext>
extends AbstractGeneratedType<ObjectTypeDeclaration, Context>
Expand All @@ -59,7 +59,7 @@ export class GeneratedObjectTypeImpl<Context extends BaseContext>
this.generatePropertiesInternal(context).map(({ name, type, hasQuestionToken, docs, irProperty }) => {
let propertyValue: ts.TypeNode = type;
if (irProperty && inlineProperties.has(irProperty)) {
const typeDeclaration = inlineProperties.get(irProperty)!;
const typeDeclaration = inlineProperties.get(irProperty) as TypeDeclaration;

Check warning on line 62 in generators/typescript/model/type-generator/src/object/GeneratedObjectTypeImpl.ts

View workflow job for this annotation

GitHub Actions / eslint

Use a ! assertion to more succinctly remove null and undefined from the type
const generatedType = context.type.getGeneratedType(typeDeclaration.name);
propertyValue = generatedType.generateForInlineUnion(context);
}
Expand Down
3 changes: 1 addition & 2 deletions generators/typescript/utils/resolvers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
},
"dependencies": {
"@fern-fern/ir-sdk": "53.22.0",
"@fern-typescript/commons": "workspace:*",
"@fern-api/core-utils": "workspace:*"
"@fern-typescript/commons": "workspace:*"
},
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a3dd964

Please sign in to comment.