-
Notifications
You must be signed in to change notification settings - Fork 225
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
Make interface types nullable/optional #74
Comments
Completely agree, it makes the typings somewhat useless, as I have to use Are these interfaces generated or can we update them manually? @scottdallamura @scottdallamura2 |
I agree too. They're generated, but we can change the generator.
…Sent from my Windows 10 phone
From: Nicholas Pape<mailto:notifications@github.com>
Sent: Monday, July 17, 2017 9:27 PM
To: Microsoft/vsts-node-api<mailto:vsts-node-api@noreply.github.com>
Cc: scottdallamura2<mailto:scott.dallamura@outlook.com>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [Microsoft/vsts-node-api] Make interface types nullable/optional (#74)
Completely agree, it makes the typings somewhat useless, as I have to use any to typecast everything.
Are these interfaces generated or can we update them manually? @scottdallamura<https://github.com/scottdallamura> @scottdallamura2<https://github.com/scottdallamura2>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#74 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHr8Srj_ZriRFuUoOk6-Km_A83wAdEBtks5sPAoUgaJpZM4L0jW->.
|
How soon will this get implemented? If it's going to be a while, maybe we can refresh the DefinitelyTyped typings and manually fix the issues there? That would be a quick temporary workaround. |
More of a question than a comment, but how do I access these interfaces in my own code? It seems that I can only access those exposed by index.d.ts? |
@lukewis for example
and then await git.createPullRequest(({
title: title,
description: description || '',
sourceRefName: sourceBranch,
targetRefName: taregtBranch
} as GitPullRequest), repositoryID, projectID); for your partial casting |
I have a PR pending for the code generation that should fix this. Once that's through we can regenerate and push here. |
Some interfaces, like
GitPullRequest
, contain a lot of members that are not mandatory according to the API docs.For example, when creating a pull request, we need a
GitPullRequest
object. This has a lot of mandatory members but the API has only 4 or 5 parameters.Is it possible to make them nullable?
The text was updated successfully, but these errors were encountered: