-
Notifications
You must be signed in to change notification settings - Fork 18
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
Copy flow files so that the module returns typed values #51
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5d9b61e
Copy flow files so that the module returns typed values
rickharris 8c260c1
Merge branch 'master' into flow-copy-source
rickharris a438c56
Try to fix the yarn lock file
rickharris ca4ec40
Merge branch 'master' into flow-copy-source
rickharris d4b9340
:shirt: lint fix
rickharris b9360fa
Fixing bad merge
rickharris d6c9d0d
Merge branch 'master' into flow-copy-source
rickharris cb8cb1e
Remove 'latest' string literal from descriptor types
rickharris 82c1933
Merge branch 'master' into flow-copy-source
rickharris 2760ed1
Move flow-copy-source to prebuild and ignore test files
rickharris cfc83bb
Export types from module index
rickharris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,12 +38,12 @@ export type CommitDescriptor = {| | |
|
||
export type BranchDescriptor = {| | ||
...ObjectDescriptor, | ||
sha: $PropertyType<ObjectDescriptor, "sha"> | "latest" | ||
sha: $PropertyType<ObjectDescriptor, "sha"> | ||
|}; | ||
|
||
export type FileDescriptor = {| | ||
...ObjectDescriptor, | ||
sha: $PropertyType<ObjectDescriptor, "sha"> | "latest", | ||
sha: $PropertyType<ObjectDescriptor, "sha">, | ||
fileId: string | ||
|}; | ||
|
||
|
@@ -55,7 +55,7 @@ export type PageDescriptor = {| | |
|
||
export type LayerDescriptor = {| | ||
...ObjectDescriptor, | ||
sha: $PropertyType<ObjectDescriptor, "sha"> | "latest", | ||
sha: $PropertyType<ObjectDescriptor, "sha">, | ||
fileId: string, | ||
pageId: string, | ||
layerId: string | ||
|
@@ -67,7 +67,7 @@ export type UserDescriptor = {| | |
userId: string | ||
|}; | ||
|
||
export type AssetDescriptor ={| | ||
export type AssetDescriptor = {| | ||
assetId: string, | ||
projectId: string | ||
|}; | ||
|
@@ -332,7 +332,7 @@ export type User = { | |
|
||
export type Organization = { | ||
billingEmail?: string, | ||
features: {[feature: string]: boolean}, | ||
features: { [feature: string]: boolean }, | ||
hasBillingInfo?: boolean, | ||
id: string, | ||
isUsernameOrganization?: boolean, | ||
|
@@ -1281,7 +1281,7 @@ export type Asset = { | |
projectId: string, | ||
scale: string, | ||
sha: string, | ||
url: string, | ||
url: string | ||
}; | ||
|
||
export interface CursorPromise<T> extends Promise<T> { | ||
|
@@ -1322,7 +1322,9 @@ export interface AbstractInterface { | |
}; | ||
|
||
organizations?: { | ||
info: (organizationDescriptor: OrganizationDescriptor) => Promise<Organization>, | ||
info: ( | ||
organizationDescriptor: OrganizationDescriptor | ||
) => Promise<Organization>, | ||
list: () => Promise<Organization[]> | ||
}; | ||
|
||
|
@@ -1413,27 +1415,21 @@ export interface AbstractInterface { | |
objectDescriptor?: OrganizationDescriptor, | ||
options?: ListOptions | ||
) => CursorPromise<Notification[]>, | ||
info: (notificationDescriptor: NotificationDescriptor) => Promise<Notification> | ||
info: ( | ||
notificationDescriptor: NotificationDescriptor | ||
) => Promise<Notification> | ||
}; | ||
|
||
users?: { | ||
list: ( | ||
objectDescriptor: OrganizationDescriptor | ProjectDescriptor | ||
) => Promise<User[]>, | ||
info: ( | ||
userDescriptor: UserDescriptor | ||
) => Promise<User> | ||
info: (userDescriptor: UserDescriptor) => Promise<User> | ||
}; | ||
|
||
assets?: { | ||
list: ( | ||
objectDescriptor: BranchDescriptor | ||
) => Promise<Asset[]>, | ||
info: ( | ||
assetDescriptor: AssetDescriptor | ||
) => Promise<Asset>, | ||
raw: ( | ||
assetDescriptor: AssetDescriptor | ||
) => Promise<ArrayBuffer> | ||
} | ||
list: (objectDescriptor: BranchDescriptor) => Promise<Asset[]>, | ||
info: (assetDescriptor: AssetDescriptor) => Promise<Asset>, | ||
raw: (assetDescriptor: AssetDescriptor) => Promise<ArrayBuffer> | ||
}; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we export some/all of these types in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a note here for future us. Flow doesn't appear to be refining the literal "latest" when a desscriptor (like
CommitDescriptor
) and descriptor that supports latest are in a union