Skip to content

Commit

Permalink
Fix theme typing
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Mar 15, 2021
1 parent 817adba commit 7b762f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/shiki/src/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type Theme =
| 'solarized-dark'
| 'solarized-light'

export const themes = [
export const themes: Theme[] = [
'dark-plus',
'github-dark',
'github-light',
Expand Down
2 changes: 1 addition & 1 deletion scripts/updateThemeSrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const themeIds = files.map(f => f.replace('.json', ''))
const themeContent = `export type Theme =
${themeIds.map(id => ` | '${id}'`).join('\n')}
export const themes = [
export const themes: Theme[] = [
${themeIds.map(id => ` '${id}'`).join(',\n')}
]
`
Expand Down

0 comments on commit 7b762f7

Please sign in to comment.