This repository was archived by the owner on Sep 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1717use namespace Facebook\TypeAssert ;
1818
1919function from_type_structure <T >(TypeStructure <T > $ts ): TypeSpec <T > {
20+ /* HH_IGNORE_ERROR[4108] 3.21 is not aware of optional_shape_field */
2021 if ($ts [' optional_shape_field' ] ?? false ) {
22+ /* HH_IGNORE_ERROR[4108] 3.21 is not aware of optional_shape_field */
2123 $ts [' optional_shape_field' ] = false ;
2224 return new OptionalSpec (from_type_structure ($ts ));
2325 }
@@ -114,6 +116,7 @@ function from_type_structure<T>(TypeStructure<T> $ts): TypeSpec<T> {
114116 ($_k , $field_ts ) ==> from_type_structure ($field_ts ),
115117 ($k , $_v ) ==> $k ,
116118 ),
119+ /* HH_IGNORE_ERROR[4108] 3.21 is not aware of allows_unknown_fields */
117120 ($ts [' allows_unknown_fields' ] ?? ! ShapeSpec :: STRICT_SHAPES )
118121 ? UnknownFieldsMode :: ALLOW
119122 : UnknownFieldsMode :: DENY ,
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ class TypeConstants {
4343 const type TShapeWithOneField = shape (
4444 ' someString' => string ,
4545 );
46+
47+ /* HH_IGNORE_ERROR[0003] no unknown shape fields in 3.21 */
4648 const type TShapeWithOneFieldAndImplicitSubtypes = shape (
4749 ' someString' => string ,
4850 ...
You can’t perform that action at this time.
0 commit comments