Giter Club home page Giter Club logo

Comments (7)

loucadufault avatar loucadufault commented on June 20, 2024

Also ran tsc, which is working with no errors.

from ts-json-schema-generator.

domoritz avatar domoritz commented on June 20, 2024

Thanks for the report. Can you provide a minimal reproducible example that demonstrates the issue?

from ts-json-schema-generator.

loucadufault avatar loucadufault commented on June 20, 2024

@domoritz Anything specifically missing from the reproducible example provided in the ticket?

from ts-json-schema-generator.

domoritz avatar domoritz commented on June 20, 2024

It's not minimal. The smaller, the easier it will be to identify whether this is a knows issue or a new issue and how to fix it.

from ts-json-schema-generator.

loucadufault avatar loucadufault commented on June 20, 2024

Considering it is a total of 4 LoC, how do you propose I minimize this further?

from ts-json-schema-generator.

domoritz avatar domoritz commented on June 20, 2024

It's referring to some extra code. I tried to extract the code for AllowNotOrAndWithImplicitAndArrayRecursive and it seems to work.

type AllowArray<T> = T | T[];

interface OpTypes {
    readonly and: unique symbol;
    readonly or: unique symbol;
    readonly not: unique symbol;
}

const Op: OpTypes = {
    and: Symbol.for("and"),
    or: Symbol.for("or"),
    not: Symbol.for("not"),
} as OpTypes;

type AllowNotOrAndWithImplicitAndArrayRecursive<T> = AllowArray<
    | T
    | { [Op.or]: AllowArray<AllowNotOrAndWithImplicitAndArrayRecursive<T>> }
    | { [Op.and]: AllowArray<AllowNotOrAndWithImplicitAndArrayRecursive<T>> }
    | { [Op.not]: AllowNotOrAndWithImplicitAndArrayRecursive<T> }
>;

export type Test = AllowNotOrAndWithImplicitAndArrayRecursive<number>;

I ran yarn --silent run run --path 'test.ts' --type 'Test'

from ts-json-schema-generator.

arthurfiorette avatar arthurfiorette commented on June 20, 2024

The above example indeed seems to work. Please attach a minimal reproducible example if the problem persists

from ts-json-schema-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.