Skip to content

Commit

Permalink
Strip Mobile* enum values from Typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Oct 31, 2024
1 parent be1ed6f commit d08e2b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/build-typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ shopt -s extglob
pushd schemas
for f in !(Mobile*).json; do
ts_path=../types/typescript/${f%.*}.d.ts
json2ts $f -o $ts_path
json2ts "$f" -o "$ts_path"
# sed compatibility with both GNU & BSD
sed -i.bak '/| "Mobile/d' "$ts_path"
rm "$ts_path.bak"
done;
popd

0 comments on commit d08e2b2

Please sign in to comment.