Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed old func type defs
  • Loading branch information
Tiberiu02 committed Oct 10, 2022
commit deb118ce3224620a475f717da9e1d8e5447466da
14 changes: 0 additions & 14 deletions typescript-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1025,11 +1025,6 @@ export class JsonSchemaGenerator {
return definition;
}

if (this.args.typeOfKeyword && node.kind === ts.SyntaxKind.FunctionType) {
definition.typeof = "function";
return definition;
}

const clazz = <ts.ClassDeclaration>node;
const props = this.tc.getPropertiesOfType(clazzType).filter((prop) => {
// filter never
Expand Down Expand Up @@ -1209,15 +1204,6 @@ export class JsonSchemaGenerator {
reffedType = undefined;
}

if (
this.args.typeOfKeyword &&
typ.flags & ts.TypeFlags.Object &&
(<ts.ObjectType>typ).objectFlags & ts.ObjectFlags.Anonymous
) {
definition.typeof = "function";
return definition;
}

let returnedDefinition = definition; // returned definition, may be a $ref

// Parse property comments now to skip recursive if ignore.
Expand Down