-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing Headers interface augmentation from lib.dom.iterable.d.ts #97
Conversation
index.d.ts
Outdated
HeadersInit, | ||
Request, | ||
RequestInfo, | ||
RequestInit, | ||
Response, | ||
ResponseInit, | ||
} from "./lib.fetch" | ||
import type { Headers as IterHeaders } from "./lib.fetch.dom.iterable"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should abbreviate the file name to lib.fetch.iterable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, don't forget to add this file to the files
property on package.json
test.ts
Outdated
const headers = new Headers(); | ||
for (const h of headers) { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this file won't be needed anymore.
declaration files were generated and tested with the following command: npm i --no-save [email protected] \ && cat <<EOF > .ts-graftrc.yaml \ && npx [email protected] \ && rm .ts-graftrc.yaml \ && npx tsc --lib ES2016 --target ES2016 --noEmit index.d.ts \ && npm un typescript grafts: - source: typescript/lib/lib.dom.d.ts output: lib.fetch.d.ts include: - BodyInit - HeadersInit - RequestInfo - RequestInit - Response - ResponseInit - source: typescript/lib/lib.dom.iterable.d.ts output: lib.fetch.dom.iterable.d.ts include: - Headers EOF
1d79080
to
215e1ca
Compare
thanks @jstewmon ! great job! 👍 |
Added test.ts to support type checking the type declaration files.
declaration files were generated and tested with the following command:
Fixes #95
Until ts-graft can automatically merge the declarations, I thought the easy fix for now is to graft each lib file and combine the declarations manually in index.d.ts.