-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Include submodules in exported type definition #28316
Changes from all commits
e22d218
54efdb9
4a509f9
8b8c321
f6876f4
30ee48d
e05b66d
fdff6e3
d6eb0e1
19d85d3
98d9ed8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// <reference types="./types/global" /> | ||
/// <reference path="./amp.d.ts" /> | ||
/// <reference path="./app.d.ts" /> | ||
/// <reference path="./config.d.ts" /> | ||
/// <reference path="./document.d.ts" /> | ||
/// <reference path="./dynamic.d.ts" /> | ||
/// <reference path="./error.d.ts" /> | ||
/// <reference path="./head.d.ts" /> | ||
/// <reference path="./image.d.ts" /> | ||
/// <reference path="./link.d.ts" /> | ||
/// <reference path="./router.d.ts" /> | ||
/// <reference path="./script.d.ts" /> | ||
/// <reference path="./server.d.ts" /> | ||
|
||
export { default } from './types' | ||
export * from './types' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,6 @@ export async function writeAppTypeDeclarations( | |
const content = | ||
'/// <reference types="next" />' + | ||
eol + | ||
'/// <reference types="next/types/global" />' + | ||
eol + | ||
(imageImportsEnabled | ||
? '/// <reference types="next/image-types/global" />' + eol | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about |
||
: '') + | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"repository": "vercel/next.js", | ||
"bugs": "https://github.com/vercel/next.js/issues", | ||
"homepage": "https://nextjs.org", | ||
"types": "types/index.d.ts", | ||
"types": "index.d.ts", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be added to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ijjk It's added on line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any benefit to moving this file? This will now be ignored while type-checking the project when it previously wouldn't be. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ijjk The current issue with |
||
"files": [ | ||
"dist", | ||
"app.js", | ||
|
@@ -44,6 +44,7 @@ | |
"jest.d.ts", | ||
"amp.js", | ||
"amp.d.ts", | ||
"index.d.ts", | ||
"types/index.d.ts", | ||
"types/global.d.ts", | ||
"image-types/global.d.ts" | ||
|
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.
Should
next/image-types/global
be moved too?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.
That one is under a conditional so I decided not to include it because of that.