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