Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing features #104

Open
4 of 7 tasks
HoldYourWaffle opened this issue Jun 1, 2019 · 10 comments
Open
4 of 7 tasks

Missing features #104

HoldYourWaffle opened this issue Jun 1, 2019 · 10 comments

Comments

@HoldYourWaffle
Copy link

HoldYourWaffle commented Jun 1, 2019

An inventorization of features that are missing in this module (for #101).
There might be things that you (@domoritz) don't want to add, or that I missed some. If so, please tell me and I will add them to the list.

Missing features

Nice additions

@domoritz
Copy link
Member

domoritz commented Jun 1, 2019

Sounds good. Let me also mention that Vega-Lite would benefit from having support for conditionals so I am very much looking forward to having support for it.

@hansmbakker
Copy link

It seems that methods / function declarations are not exported.

@domoritz
Copy link
Member

Yes, we intentionally don't support functions. See for some reasons why not: #98

@hansmbakker
Copy link

Ok, that's clear, thank you for the quick response.

@maneetgoyal
Copy link
Contributor

@domoritz Is there a way for the schema generator to ignore the interfaces/types which have function definitions in them? I have one such interface and it is exported too.

@maneetgoyal
Copy link
Contributor

  • If it helps, I can contribute to the third task (Programatic Use documentation). Was able to set up the programmatic use for my project, so should be quick to explain the usage in the README.
  • The README is also missing an option on output file path.

@roper79
Copy link

roper79 commented Aug 31, 2020

It would be nice to have the option to add schema $id similarly to https://github.com/YousefED/typescript-json-schema. For example, https://github.com/ajv-validator/ajv needs it.

@antmarot
Copy link

antmarot commented Oct 1, 2020

@roper79 I agree having this natively would be a good thing. For your information though, I successfully achieved it by annotating types with @$id and adding the --validationKeywords "\$id" option to the CLI.

@domoritz
Copy link
Member

domoritz commented Oct 1, 2020

I'm happy to review a pull request.

@Halynsky
Copy link

What about Required?
https://www.typescriptlang.org/docs/handbook/utility-types.html#requiredtype
Currently this not work:

export interface Node = {
  name?: string;
  key?: string
  // Many other properties
}

// force key to be required
export type Wrapper {
  node: Omit<Node, 'key'> & Required<Pick<Node, 'key'>>;  
}

Workaround:

export type Wrapper {
  node: Omit<Node, 'key'> & {key: string}>;  
}

But this is not very nice in scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants