-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfb85ee
commit c8816d4
Showing
5 changed files
with
53 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Alias imports for astro to @types/astro |
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
19 changes: 19 additions & 0 deletions
19
packages/astro/test/fixtures/type-imports/src/pages/index.astro
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
import type { MarkdownInstance } from 'astro' | ||
--- | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>Astro</title> | ||
<style is:global> | ||
h1 { | ||
color: red; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Astro</h1> | ||
<img src="/puppy.png"/> | ||
</body> | ||
</html> |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expect } from 'chai'; | ||
import { loadFixture } from './test-utils.js'; | ||
|
||
describe('Type Imports', async () => { | ||
let fixture; | ||
|
||
before(async () => { | ||
fixture = await loadFixture({ root: './fixtures/type-imports' }); | ||
await fixture.build(); | ||
}); | ||
|
||
it('Allows importing types from "astro"', async () => { | ||
// if the build passes then the test succeeds | ||
expect(true).to.be.true; | ||
}); | ||
}); |