Skip to content

Commit

Permalink
Merge pull request #9 from oshx/update/svg
Browse files Browse the repository at this point in the history
Added the SVG format.
Updated README.md for setting.
Updated the package version.
  • Loading branch information
oshx authored Aug 28, 2024
2 parents 59d3525 + 889305a commit 603aed2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Please add below in `tsconfig.json` file.
{
"compilerOptions": {
"typeRoots": [
"node_modules/@oshx"
"node_modules/@oshx",
"node_modules/@types"
]
}
}
Expand All @@ -24,7 +25,8 @@ If your TypeScript doesn't accept that type, then add below.
{
"compilerOptions": {
"typeRoots": [
"node_modules/@oshx/type-helper"
"node_modules/@oshx/type-helper",
"node_modules/@types"
]
}
}
Expand Down Expand Up @@ -53,7 +55,7 @@ type AnyFunction
```

```typescript
// images like GIF, JPG, JPEG, PNG, BMP, WEBP as string module
// images like GIF, JPG, JPEG, PNG, BMP, WEBP and SVG as string module
```

## Why it comes for?
Expand Down
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,13 @@ declare module '*.bmp' {
*/
declare module '*.webp' {
export default string
}

/** Image File Format SVG
*
* @example
* import example from '~/statics/example.svg';
*/
declare module '*.svg' {
export default string
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oshx/type-helper",
"version": "1.0.7",
"version": "1.0.8",
"description": "Types help TypeScript types.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 603aed2

Please sign in to comment.