Skip to content

Commit

Permalink
Consolidate fb-watchman Flow lib defs into Metro
Browse files Browse the repository at this point in the history
Summary: Add some internally-used Flow types to `fb-watchman`'s lib def for some cleanup.

Reviewed By: huntie

Differential Revision: D39742231

fbshipit-source-id: df5fb5e45be83b66df8bb1931c43ccbbf9e4fa5d
  • Loading branch information
robhogan authored and facebook-github-bot committed Sep 26, 2022
1 parent 261affd commit ab58166
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions flow-typed/fb-watchman.js
Expand Up @@ -15,14 +15,26 @@ declare module 'fb-watchman' {
...
}>;

declare type WatchmanFile = $ReadOnly<{
+exists: true,
+name: string,
+'content.sha1hex': string,
declare type SavedStateInfo = $ReadOnly<{
'manifold-path': ?string,
'manifold-bucket': ?string,
error: ?string,
}>;

declare type WatchmanQueryResponse = $ReadOnly<{
declare export type WatchmanFile = $ReadOnly<{
exists: true,
name: string,
'content.sha1hex': string,
}>;

declare export type WatchmanQueryResponse = $ReadOnly<{
'saved-state-info'?: SavedStateInfo,
files: $ReadOnlyArray<WatchmanFile>,
clock: {
scm: {'mergebase-with': string, mergebase: string},
clock: string,
},
is_fresh_instance: boolean,
}>;

declare type WatchmanExpression = Array<
Expand All @@ -32,6 +44,11 @@ declare module 'fb-watchman' {
declare type WatchmanQuerySince = {
scm: {
'mergebase-with': string,
'saved-state'?: {
storage: string,
config: {project: string, ...},
...
},
...
},
};
Expand Down

0 comments on commit ab58166

Please sign in to comment.