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

Cleanup data transfer types #149774

Merged
merged 2 commits into from
May 23, 2022
Merged

Cleanup data transfer types #149774

merged 2 commits into from
May 23, 2022

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented May 17, 2022

This change attempts to clean up our internal data transfer types

  • Replace IDataTransfer (which was just an alias for map) with a VSDataTransfer helper class.

    This lets us add helpers and also restrict what you can do on a datatransfer

  • Move DataTransferDTO types into protocol

  • Move DataTransferTypeConverter into typeConvert

  • Don't return internal types to extension callers

    For example, previously we leaked IDataTransfer out into providers / controllers. Instead we should always return a real instance of vscode.DataTransfer to extensions

  • Mark vscode.DataTransfer._items as private

    Extensions should not be able to access this field

This change attempts to clean up our internal data transfer types

- Replace `IDataTransfer` (which was just an alias for map) with a `VSDataTransfer` helper class.

    This lets us add helpers and also restrict what you can do on a datatransfer

- Move `DataTransferDTO` types into `protocol`

- Move `DataTransferTypeConverter` into `typeConvert`

- Don't return internal types to ext host callers

     For example, previously we leaked `IDataTransfer` out into providers / controllers. Instead we should always return an instance of `vscode.DataTransfer` to extensions
@mjbvz mjbvz added this to the May 2022 milestone May 17, 2022
@mjbvz mjbvz requested a review from alexr00 May 17, 2022 22:41
@mjbvz mjbvz self-assigned this May 17, 2022
@mjbvz mjbvz enabled auto-merge (squash) May 17, 2022 22:41
@mjbvz mjbvz merged commit 91923ba into microsoft:main May 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants