Page MenuHomePhabricator

[lib] move a shared type to lib
ClosedPublic

Authored by varun on Sep 8 2023, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 12:07 PM
Unknown Object (File)
Sat, May 4, 12:07 PM
Unknown Object (File)
Sat, May 4, 12:03 PM
Unknown Object (File)
Sat, May 4, 11:30 AM
Unknown Object (File)
Wed, May 1, 11:24 PM
Unknown Object (File)
Wed, May 1, 2:00 PM
Unknown Object (File)
Apr 17 2024, 6:29 PM
Unknown Object (File)
Apr 16 2024, 3:20 AM
Subscribers

Details

Summary

This type is needed on native/web too so I'm moving it.

Depends on D9114

Test Plan

ran flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun published this revision for review.Sep 8 2023, 12:59 PM
marcin added inline comments.
lib/types/identity-service-types.js
1 ↗(On Diff #30878)

Each time I am about to introduce new file I tend to ask myself whether it is possible to reuse already existing location and if it is would it be better to reuse or to introduce new file. How about putting this type into account-types? od merging it with LogInResponse?

This revision is now accepted and ready to land.Sep 11 2023, 5:18 AM
lib/types/identity-service-types.js
1 ↗(On Diff #30878)

I don't think it's bad for it to be in a separate file. That said, the annotation at the top of the file needs a space (see suggested edit)

As mentioned here, @varun please try to maintain consistency on small things like this in the future. As evidenced by @marcin missing this, we simply can't rely on diff reviewers to catch small nits like this – it's on the diff author to do their best to match existing conventions

lib/types/identity-service-types.js
1 ↗(On Diff #30878)

Most of the IDEs allow creating templates for files. In my case, I've configured that each new js file has

// @flow

at the start. You can consider doing something similar.

lib/types/identity-service-types.js
1 ↗(On Diff #30878)

good tip!

This revision was automatically updated to reflect the committed changes.