-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor/types #11715
Merged
Merged
Refactor/types #11715
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e179369
refactor: types
Princesseuh f286a0b
feat: refactor types
Princesseuh 9279d56
chore: organize imports
Princesseuh 5e928f5
fix: remaining references
Princesseuh 0a5a2d9
docs: types
Princesseuh 3d0cb57
refactor: small changes
Princesseuh b931b02
chore: changeset
Princesseuh da94ba7
Merge branch 'next' into refactor/types
Princesseuh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,6 @@ | |
/// <reference path="./types/content.d.ts" /> | ||
/// <reference path="./types/actions.d.ts" /> | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
declare namespace App { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface Locals {} | ||
} | ||
|
||
interface ImportMetaEnv { | ||
/** | ||
* The prefix for Astro-generated asset links if the build.assetsPrefix config option is set. This can be used to create asset links not handled by Astro. | ||
|
@@ -52,7 +46,7 @@ declare module 'astro:assets' { | |
getImage: ( | ||
options: import('./dist/assets/types.js').UnresolvedImageTransform, | ||
) => Promise<import('./dist/assets/types.js').GetImageResult>; | ||
imageConfig: import('./dist/@types/astro.js').AstroConfig['image']; | ||
imageConfig: import('./dist/types/public/config.js').AstroConfig['image']; | ||
getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService; | ||
inferRemoteSize: typeof import('./dist/assets/utils/index.js').inferRemoteSize; | ||
Image: typeof import('./components/Image.astro').default; | ||
|
@@ -172,7 +166,7 @@ declare module 'astro:components' { | |
export * from 'astro/components'; | ||
} | ||
|
||
type MD = import('./dist/@types/astro.js').MarkdownInstance<Record<string, any>>; | ||
type MD = import('./dist/types/public/content.js').MarkdownInstance<Record<string, any>>; | ||
interface ExportedMarkdownModuleEntities { | ||
frontmatter: MD['frontmatter']; | ||
file: MD['file']; | ||
|
@@ -191,7 +185,6 @@ declare module '*.md' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
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. That method hasn't existed in a while. |
||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -206,7 +199,6 @@ declare module '*.markdown' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -221,7 +213,6 @@ declare module '*.mkdn' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -236,7 +227,6 @@ declare module '*.mkd' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -251,7 +241,6 @@ declare module '*.mdwn' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -266,7 +255,6 @@ declare module '*.mdown' { | |
file, | ||
url, | ||
getHeadings, | ||
getHeaders, | ||
Content, | ||
rawContent, | ||
compiledContent, | ||
|
@@ -275,7 +263,7 @@ declare module '*.mdown' { | |
} | ||
|
||
declare module '*.mdx' { | ||
type MDX = import('./dist/@types/astro.js').MDXInstance<Record<string, any>>; | ||
type MDX = import('./dist/types/public/content.js').MDXInstance<Record<string, any>>; | ||
|
||
export const frontmatter: MDX['frontmatter']; | ||
export const file: MDX['file']; | ||
|
@@ -288,7 +276,7 @@ declare module '*.mdx' { | |
} | ||
|
||
declare module 'astro:ssr-manifest' { | ||
export const manifest: import('./dist/@types/astro.js').SSRManifest; | ||
export const manifest: import('./dist/types/public/internal.js').SSRManifest; | ||
} | ||
|
||
// Everything below are Vite's types (apart from image types, which are in `client.d.ts`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export type * from './dist/@types/astro.js'; | ||
export type * from './dist/types/public/index.js'; | ||
export * from './dist/core/index.js'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is unnecessary, the default definition is already that. However, it was done in a
.d.ts
file, which don't get sent todist
so it never worked.