We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
addEntity
In some integrations there is a type representing the entities created by the integration. Consider the following code:
function createGroupEntity(group: BitbucketGroup): BitbucketGroupEntity { return createIntegrationEntity({ entityData: { source: group, assign: { displayName: group.name, }, }, }) as BitbucketGroupEntity; } export function createWorkspaceHasGroupRelationship( workspace: BitbucketWorkspaceEntity, group: BitbucketGroupEntity, ): BitbucketWorkspaceGroupRelationship { return { _key: `${workspace._key}|has|${group._key}`, _class: 'HAS', _type: BITBUCKET_WORKSPACE_GROUP_RELATIONSHIP_TYPE, _fromEntityKey: workspace._key, _toEntityKey: group._key, displayName: 'HAS', }; } const workspaceEntity = ....; const groupEntity = await jobState.addEntity(createGroupEntity(group)); // groupEntity is type Entity createWorkspaceHasGroupRelationship(workspaceEntity, groupEntity); // < -- compilation problem
addEntity should return the type of the argument so that groupEntity: BitbucketGroupEntity.
groupEntity: BitbucketGroupEntity
Related to #270
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In some integrations there is a type representing the entities created by the integration. Consider the following code:
addEntity
should return the type of the argument so thatgroupEntity: BitbucketGroupEntity
.Related to #270
The text was updated successfully, but these errors were encountered: