Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit e076c42

Browse files
committed
remove new public type structure functions
1 parent 175a2c8 commit e076c42

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/TypeAssert.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function classname_of<T>(classname<T> $expected, string $what): classname<T> {
5656
}
5757

5858
function matches_type_structure<T>(TypeStructure<T> $ts, mixed $value): T {
59-
return TypeSpec\of_type_structure($ts)->assertType($value);
59+
return TypeSpec\__Private\from_type_structure($ts)->assertType($value);
6060
}
6161

6262
function matches<reify T>(mixed $value): T {

src/TypeCoerce.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function arraykey(mixed $x): arraykey {
4141
}
4242

4343
function match_type_structure<T>(TypeStructure<T> $ts, mixed $value): T {
44-
return TypeSpec\of_type_structure($ts)->coerceType($value);
44+
return TypeSpec\__Private\from_type_structure($ts)->coerceType($value);
4545
}
4646

4747
function match<reify T>(mixed $value): T {

src/TypeSpec.hack

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ function varray_or_darray<Tv>(
177177
return new __Private\VArrayOrDArraySpec($inner);
178178
}
179179

180-
function of_type_structure<T>(TypeStructure<T> $ts): TypeSpec<T> {
181-
return __Private\from_type_structure($ts);
182-
}
183-
184180
function of<reify T>(): TypeSpec<T> {
185-
return of_type_structure(\HH\ReifiedGenerics\get_type_structure<T>());
181+
return __Private\from_type_structure(
182+
\HH\ReifiedGenerics\get_type_structure<T>(),
183+
);
186184
}

0 commit comments

Comments
 (0)