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

Review Typing support of the gitbeaker distributions #793

Closed
jdalrymple opened this issue May 13, 2020 · 6 comments · Fixed by #795
Closed

Review Typing support of the gitbeaker distributions #793

jdalrymple opened this issue May 13, 2020 · 6 comments · Fixed by #795

Comments

@jdalrymple
Copy link
Owner

There seems to be missing typing for the latest releases of the gitbeaker libraries. :/

@jdalrymple
Copy link
Owner Author

Im getting some weird results when testing the typing. When i build the libraries locally, a d.ts file is generated like this:

import * as Gitbeaker from '@gitbeaker/core';
export declare const Groups: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Groups>, GroupAccessRequests: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupAccessRequests>, GroupBadges: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupBadges>, GroupCustomAttributes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupCustomAttributes>, GroupIssueBoards: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupIssueBoards>, GroupMembers: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupMembers>, GroupMilestones: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupMilestones>, GroupProjects: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupProjects>, GroupVariables: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupVariables>, GroupLabels: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GroupLabels>, Epics: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Epics>, EpicIssues: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.EpicIssues>, EpicNotes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.EpicNotes>, EpicDiscussions: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.EpicDiscussions>, Users: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Users>, UserCustomAttributes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.UserCustomAttributes>, UserEmails: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.UserEmails>, UserImpersonationTokens: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.UserImpersonationTokens>, UserKeys: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.UserKeys>, UserGPGKeys: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.UserGPGKeys>, Branches: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Branches>, Commits: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Commits>, CommitDiscussions: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.CommitDiscussions>, ContainerRegistry: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ContainerRegistry>, Deployments: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Deployments>, DeployKeys: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.DeployKeys>, Environments: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Environments>, Issues: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Issues>, IssuesStatistics: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.IssuesStatistics>, IssueNotes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.IssueNotes>, IssueDiscussions: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.IssueDiscussions>, IssueAwardEmojis: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.IssueAwardEmojis>, Jobs: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Jobs>, Labels: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Labels>, MergeRequests: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.MergeRequests>, MergeRequestAwardEmojis: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.MergeRequestAwardEmojis>, MergeRequestDiscussions: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.MergeRequestDiscussions>, MergeRequestNotes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.MergeRequestNotes>, Packages: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Packages>, Pipelines: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Pipelines>, PipelineSchedules: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.PipelineSchedules>, PipelineScheduleVariables: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.PipelineScheduleVariables>, Projects: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Projects>, ProjectAccessRequests: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectAccessRequests>, ProjectBadges: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectBadges>, ProjectCustomAttributes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectCustomAttributes>, ProjectImportExport: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectImportExport>, ProjectIssueBoards: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectIssueBoards>, ProjectHooks: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectHooks>, ProjectMembers: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectMembers>, ProjectMilestones: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectMilestones>, ProjectSnippets: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectSnippets>, ProjectSnippetNotes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectSnippetNotes>, ProjectSnippetDiscussions: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectSnippetDiscussions>, ProjectSnippetAwardEmojis: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectSnippetAwardEmojis>, ProtectedBranches: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProtectedBranches>, ProtectedTags: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProtectedTags>, ProjectVariables: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ProjectVariables>, PushRules: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.PushRules>, Releases: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Releases>, ReleaseLinks: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ReleaseLinks>, Repositories: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Repositories>, RepositoryFiles: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.RepositoryFiles>, Runners: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Runners>, Services: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Services>, Tags: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Tags>, Todos: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Todos>, Triggers: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Triggers>, VulnerabilityFindings: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.VulnerabilityFindings>, ApplicationSettings: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.ApplicationSettings>, BroadcastMessages: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.BroadcastMessages>, Events: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Events>, FeatureFlags: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.FeatureFlags>, GeoNodes: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GeoNodes>, GitignoreTemplates: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GitignoreTemplates>, GitLabCIYMLTemplates: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.GitLabCIYMLTemplates>, Keys: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Keys>, License: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.License>, LicenceTemplates: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.LicenceTemplates>, Lint: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Lint>, Namespaces: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Namespaces>, NotificationSettings: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.NotificationSettings>, Markdown: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Markdown>, PagesDomains: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.PagesDomains>, Search: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Search>, SidekiqMetrics: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.SidekiqMetrics>, Snippets: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Snippets>, SystemHooks: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.SystemHooks>, Version: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Version>, Wikis: import("@gitbeaker/requester-utils").Constructor<Gitbeaker.Wikis>, GroupsBundle: import("@gitbeaker/requester-utils").Constructor<{
    Groups: Gitbeaker.Groups;
    GroupAccessRequests: Gitbeaker.GroupAccessRequests;
    GroupBadges: Gitbeaker.GroupBadges;
    GroupCustomAttributes: Gitbeaker.GroupCustomAttributes;
    GroupIssueBoards: Gitbeaker.GroupIssueBoards;
    GroupMembers: Gitbeaker.GroupMembers;
    GroupMilestones: Gitbeaker.GroupMilestones;
    GroupProjects: Gitbeaker.GroupProjects;
    GroupVariables: Gitbeaker.GroupVariables;
    GroupLabels: Gitbeaker.GroupLabels;
    GroupDeployTokens: Gitbeaker.GroupDeployTokens;
    Epics: Gitbeaker.Epics;
    EpicIssues: Gitbeaker.EpicIssues;
    EpicNotes: Gitbeaker.EpicNotes;
    EpicDiscussions: Gitbeaker.EpicDiscussions;
}>, UsersBundle: import("@gitbeaker/requester-utils").Constructor<{
    Users: Gitbeaker.Users;
    UserCustomAttributes: Gitbeaker.UserCustomAttributes;
    UserEmails: Gitbeaker.UserEmails;
    UserImpersonationTokens: Gitbeaker.UserImpersonationTokens;
    UserKeys: Gitbeaker.UserKeys;
    UserGPGKeys: Gitbeaker.UserGPGKeys;
}>, ProjectsBundle: import("@gitbeaker/requester-utils").Constructor<{
    Branches: Gitbeaker.Branches;
    Commits: Gitbeaker.Commits;
    CommitDiscussions: Gitbeaker.CommitDiscussions;
    ContainerRegistry: Gitbeaker.ContainerRegistry;
    DeployKeys: Gitbeaker.DeployKeys;
    Deployments: Gitbeaker.Deployments;
    Environments: Gitbeaker.Environments;
    Issues: Gitbeaker.Issues;
    IssuesStatistics: Gitbeaker.IssuesStatistics;
    IssueAwardEmojis: Gitbeaker.IssueAwardEmojis;
    IssueNotes: Gitbeaker.IssueNotes;
    IssueDiscussions: Gitbeaker.IssueDiscussions;
    Jobs: Gitbeaker.Jobs;
    Labels: Gitbeaker.Labels;
    MergeRequests: Gitbeaker.MergeRequests;
    MergeRequestAwardEmojis: Gitbeaker.MergeRequestAwardEmojis;
    MergeRequestDiscussions: Gitbeaker.MergeRequestDiscussions;
    MergeRequestNotes: Gitbeaker.MergeRequestNotes;
    Packages: Gitbeaker.Packages;
    Pipelines: Gitbeaker.Pipelines;
    PipelineSchedules: Gitbeaker.PipelineSchedules;
    PipelineScheduleVariables: Gitbeaker.PipelineScheduleVariables;
    Projects: Gitbeaker.Projects;
    ProjectAccessRequests: Gitbeaker.ProjectAccessRequests;
    ProjectBadges: Gitbeaker.ProjectBadges;
    ProjectCustomAttributes: Gitbeaker.ProjectCustomAttributes;
    ProjectImportExport: Gitbeaker.ProjectImportExport;
    ProjectIssueBoards: Gitbeaker.ProjectIssueBoards;
    ProjectHooks: Gitbeaker.ProjectHooks;
    ProjectMembers: Gitbeaker.ProjectMembers;
    ProjectMilestones: Gitbeaker.ProjectMilestones;
    ProjectSnippets: Gitbeaker.ProjectSnippets;
    ProjectSnippetNotes: Gitbeaker.ProjectSnippetNotes;
    ProjectSnippetDiscussions: Gitbeaker.ProjectSnippetDiscussions;
    ProjectSnippetAwardEmojis: Gitbeaker.ProjectSnippetAwardEmojis;
    ProtectedBranches: Gitbeaker.ProtectedBranches;
    ProtectedTags: Gitbeaker.ProtectedTags;
    ProjectVariables: Gitbeaker.ProjectVariables;
    ProjectDeployTokens: Gitbeaker.ProjectDeployTokens;
    PushRules: Gitbeaker.PushRules;
    Releases: Gitbeaker.Releases;
    ReleaseLinks: Gitbeaker.ReleaseLinks;
    Repositories: Gitbeaker.Repositories;
    RepositoryFiles: Gitbeaker.RepositoryFiles;
    Runners: Gitbeaker.Runners;
    Services: Gitbeaker.Services;
    Tags: Gitbeaker.Tags;
    Todos: Gitbeaker.Todos;
    Triggers: Gitbeaker.Triggers;
    VulnerabilityFindings: Gitbeaker.VulnerabilityFindings;
}>, Gitlab: import("@gitbeaker/requester-utils").Constructor<{
    Groups: Gitbeaker.Groups;
    GroupAccessRequests: Gitbeaker.GroupAccessRequests;
    GroupBadges: Gitbeaker.GroupBadges;
    GroupCustomAttributes: Gitbeaker.GroupCustomAttributes;
    GroupIssueBoards: Gitbeaker.GroupIssueBoards;
    GroupMembers: Gitbeaker.GroupMembers;
    GroupMilestones: Gitbeaker.GroupMilestones;
    GroupProjects: Gitbeaker.GroupProjects;
    GroupVariables: Gitbeaker.GroupVariables;
    GroupLabels: Gitbeaker.GroupLabels;
    GroupDeployTokens: Gitbeaker.GroupDeployTokens;
    Epics: Gitbeaker.Epics;
    EpicIssues: Gitbeaker.EpicIssues;
    EpicNotes: Gitbeaker.EpicNotes;
    EpicDiscussions: Gitbeaker.EpicDiscussions;
    Users: Gitbeaker.Users;
    UserCustomAttributes: Gitbeaker.UserCustomAttributes;
    UserEmails: Gitbeaker.UserEmails;
    UserImpersonationTokens: Gitbeaker.UserImpersonationTokens;
    UserKeys: Gitbeaker.UserKeys;
    UserGPGKeys: Gitbeaker.UserGPGKeys;
    Branches: Gitbeaker.Branches;
    Commits: Gitbeaker.Commits;
    CommitDiscussions: Gitbeaker.CommitDiscussions;
    ContainerRegistry: Gitbeaker.ContainerRegistry;
    DeployKeys: Gitbeaker.DeployKeys;
    Deployments: Gitbeaker.Deployments;
    Environments: Gitbeaker.Environments;
    Issues: Gitbeaker.Issues;
    IssuesStatistics: Gitbeaker.IssuesStatistics;
    IssueAwardEmojis: Gitbeaker.IssueAwardEmojis;
    IssueNotes: Gitbeaker.IssueNotes;
    IssueDiscussions: Gitbeaker.IssueDiscussions;
    Jobs: Gitbeaker.Jobs;
    Labels: Gitbeaker.Labels;
    MergeRequests: Gitbeaker.MergeRequests;
    MergeRequestAwardEmojis: Gitbeaker.MergeRequestAwardEmojis;
    MergeRequestDiscussions: Gitbeaker.MergeRequestDiscussions;
    MergeRequestNotes: Gitbeaker.MergeRequestNotes;
    Packages: Gitbeaker.Packages;
    Pipelines: Gitbeaker.Pipelines;
    PipelineSchedules: Gitbeaker.PipelineSchedules;
    PipelineScheduleVariables: Gitbeaker.PipelineScheduleVariables;
    Projects: Gitbeaker.Projects;
    ProjectAccessRequests: Gitbeaker.ProjectAccessRequests;
    ProjectBadges: Gitbeaker.ProjectBadges;
    ProjectCustomAttributes: Gitbeaker.ProjectCustomAttributes;
    ProjectImportExport: Gitbeaker.ProjectImportExport;
    ProjectIssueBoards: Gitbeaker.ProjectIssueBoards;
    ProjectHooks: Gitbeaker.ProjectHooks;
    ProjectMembers: Gitbeaker.ProjectMembers;
    ProjectMilestones: Gitbeaker.ProjectMilestones;
    ProjectSnippets: Gitbeaker.ProjectSnippets;
    ProjectSnippetNotes: Gitbeaker.ProjectSnippetNotes;
    ProjectSnippetDiscussions: Gitbeaker.ProjectSnippetDiscussions;
    ProjectSnippetAwardEmojis: Gitbeaker.ProjectSnippetAwardEmojis;
    ProtectedBranches: Gitbeaker.ProtectedBranches;
    ProtectedTags: Gitbeaker.ProtectedTags;
    ProjectVariables: Gitbeaker.ProjectVariables;
    ProjectDeployTokens: Gitbeaker.ProjectDeployTokens;
    PushRules: Gitbeaker.PushRules;
    Releases: Gitbeaker.Releases;
    ReleaseLinks: Gitbeaker.ReleaseLinks;
    Repositories: Gitbeaker.Repositories;
    RepositoryFiles: Gitbeaker.RepositoryFiles;
    Runners: Gitbeaker.Runners;
    Services: Gitbeaker.Services;
    Tags: Gitbeaker.Tags;
    Todos: Gitbeaker.Todos;
    Triggers: Gitbeaker.Triggers;
    VulnerabilityFindings: Gitbeaker.VulnerabilityFindings;
    ApplicationSettings: Gitbeaker.ApplicationSettings;
    BroadcastMessages: Gitbeaker.BroadcastMessages;
    Events: Gitbeaker.Events;
    FeatureFlags: Gitbeaker.FeatureFlags;
    GeoNodes: Gitbeaker.GeoNodes;
    GitignoreTemplates: Gitbeaker.GitignoreTemplates;
    GitLabCIYMLTemplates: Gitbeaker.GitLabCIYMLTemplates;
    Keys: Gitbeaker.Keys;
    License: Gitbeaker.License;
    LicenceTemplates: Gitbeaker.LicenceTemplates;
    Lint: Gitbeaker.Lint;
    Namespaces: Gitbeaker.Namespaces;
    NotificationSettings: Gitbeaker.NotificationSettings;
    Markdown: Gitbeaker.Markdown;
    PagesDomains: Gitbeaker.PagesDomains;
    Search: Gitbeaker.Search;
    SidekiqMetrics: Gitbeaker.SidekiqMetrics;
    Snippets: Gitbeaker.Snippets;
    SystemHooks: Gitbeaker.SystemHooks;
    Version: Gitbeaker.Version;
    Wikis: Gitbeaker.Wikis;
}>;

But when accessing the library like @gitbeaker/node through npm linking in another test package, it still shows up any :/

@pablobirukov
Copy link
Contributor

pablobirukov commented May 24, 2020

What is the expected behavior? With the latest master, linking the package, type information is in order

2020-05-24_11-10-18

UPD Same result with v19.7.0

@jdalrymple
Copy link
Owner Author

I think it was missing from the browser release and there were some circumstances where this would happen. So I figured i should take another look at the code and clean it up if needed.

@jdalrymple
Copy link
Owner Author

Also, when using the tests, importing the @gitbeaker/node library and typing the variables, i would receive a "being used as a type, but is a value" error, so i definitely wasnt doing something correctly with the type and their exports.

@Melissa8599
Copy link

Hey I no it’s going to be a min befor I get back up

@jdalrymple
Copy link
Owner Author

🚀 Issue was released in 23.1.0 🚀

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

Successfully merging a pull request may close this issue.

3 participants