request.js/bin/localize-types

15 lines
250 B
Plaintext
Raw Normal View History

#!/bin/sh
my_typedefs="$(
2022-09-01 06:59:05 +00:00
grep typedef ./index.js | cut -d ' ' -f5
)"
2022-09-01 06:59:05 +00:00
rm -f ./types.js
{
echo '/**'
for my_type in $my_typedefs; do
2022-09-01 06:59:05 +00:00
echo " * @typedef {import('./').${my_type}} ${my_type}"
done
echo ' */'
2022-09-01 06:59:05 +00:00
} >> ./types.js