Skip to content

Commit

Permalink
fix(build): Updating default .d.ts pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
himerus committed Mar 8, 2024
1 parent 677c447 commit 83574ae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ log.txt

## Types & Maps
*.d.ts
!styles.d.ts
!component.d.ts
*.d.ts.map
*.js.map
*.map
Expand Down
22 changes: 22 additions & 0 deletions packages/components/outline-core-link/src/component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

/**
* @file
* This is a TypeScript declaration file. It provides type checking and autocompletion
* for TypeScript files. It can be used as a reference for future components.
*
* @see {@link https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules | TypeScript Ambient Modules}
*/

/**
* This declaration is for importing CSS files as a string.
*
* This is made possible by the `?inline` query parameter in Vite, which allows
* the CSS file to be imported as a string instead of being injected into a `<style>` tag.
* This gives us the flexibility to use the CSS content in any way we see fit within our code.
*
* @see {@link https://vitejs.dev/guide/features.html#disabling-css-injection-into-the-page | Disabling CSS injection into the page}
*/
declare module '*.css?inline' {
const content: string;
export default content;
}
4 changes: 0 additions & 4 deletions packages/components/outline-core-link/src/styles.d.ts

This file was deleted.

0 comments on commit 83574ae

Please sign in to comment.