request.js/bin/localize-types

15 lines
250 B
Plaintext
Raw Normal View History

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