-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: use const instead of enums to min bundle size (#192)
- Loading branch information
Showing
7 changed files
with
63 additions
and
46 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
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
10 changes: 6 additions & 4 deletions
10
projects/ngx-meta/src/open-graph-profile/src/open-graph-profile-gender.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export enum OpenGraphProfileGender { | ||
Male = 'male', | ||
Female = 'female', | ||
} | ||
export const OPEN_GRAPH_PROFILE_GENDER_FEMALE = 'female' | ||
export const OPEN_GRAPH_PROFILE_GENDER_MALE = 'male' | ||
|
||
export type OpenGraphProfileGender = | ||
| typeof OPEN_GRAPH_PROFILE_GENDER_FEMALE | ||
| typeof OPEN_GRAPH_PROFILE_GENDER_MALE |
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,14 +1,25 @@ | ||
export enum OpenGraphType { | ||
MusicSong = 'music.song', | ||
MusicAlbum = 'music.album', | ||
MusicPlaylist = 'music.playlist', | ||
MusicRadioStation = 'music.radio_station', | ||
VideoMovie = 'video.movie', | ||
VideoEpisode = 'video.episode', | ||
VideoTvShow = 'video.tv_show', | ||
VideoOther = 'video.other', | ||
Article = 'article', | ||
Book = 'book', | ||
Profile = 'profile', | ||
Website = 'website', | ||
} | ||
export const OPEN_GRAPH_TYPE_MUSIC_SONG = 'music.song' | ||
export const OPEN_GRAPH_TYPE_MUSIC_ALBUM = 'music.album' | ||
export const OPEN_GRAPH_TYPE_MUSIC_PLAYLIST = 'music.playlist' | ||
export const OPEN_GRAPH_TYPE_MUSIC_RADIO_STATION = 'music.radio_station' | ||
export const OPEN_GRAPH_TYPE_VIDEO_MOVIE = 'video.movie' | ||
export const OPEN_GRAPH_TYPE_VIDEO_EPISODE = 'video.episode' | ||
export const OPEN_GRAPH_TYPE_VIDEO_TV_SHOW = 'video.tv_show' | ||
export const OPEN_GRAPH_TYPE_VIDEO_OTHER = 'video.other' | ||
export const OPEN_GRAPH_TYPE_ARTICLE = 'article' | ||
export const OPEN_GRAPH_TYPE_BOOK = 'book' | ||
export const OPEN_GRAPH_TYPE_PROFILE = 'profile' | ||
export const OPEN_GRAPH_TYPE_WEBSITE = 'website' | ||
export type OpenGraphType = | ||
| typeof OPEN_GRAPH_TYPE_MUSIC_SONG | ||
| typeof OPEN_GRAPH_TYPE_MUSIC_ALBUM | ||
| typeof OPEN_GRAPH_TYPE_MUSIC_PLAYLIST | ||
| typeof OPEN_GRAPH_TYPE_MUSIC_RADIO_STATION | ||
| typeof OPEN_GRAPH_TYPE_VIDEO_MOVIE | ||
| typeof OPEN_GRAPH_TYPE_VIDEO_EPISODE | ||
| typeof OPEN_GRAPH_TYPE_VIDEO_TV_SHOW | ||
| typeof OPEN_GRAPH_TYPE_VIDEO_OTHER | ||
| typeof OPEN_GRAPH_TYPE_ARTICLE | ||
| typeof OPEN_GRAPH_TYPE_BOOK | ||
| typeof OPEN_GRAPH_TYPE_PROFILE | ||
| typeof OPEN_GRAPH_TYPE_WEBSITE |
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
16 changes: 10 additions & 6 deletions
16
projects/ngx-meta/src/twitter-card/src/twitter-card-type.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
export enum TwitterCardType { | ||
Summary = 'summary', | ||
SummaryLargeImage = 'summary_large_image', | ||
App = 'app', | ||
Player = 'player', | ||
} | ||
export const TWITTER_CARD_TYPE_SUMMARY = 'summary' | ||
export const TWITTER_CARD_TYPE_SUMMARY_LARGE_IMAGE = 'summary_large_image' | ||
export const TWITTER_CARD_TYPE_APP = 'app' | ||
export const TWITTER_CARD_TYPE_PLAYER = 'player' | ||
|
||
export type TwitterCardType = | ||
| typeof TWITTER_CARD_TYPE_SUMMARY | ||
| typeof TWITTER_CARD_TYPE_SUMMARY_LARGE_IMAGE | ||
| typeof TWITTER_CARD_TYPE_APP | ||
| typeof TWITTER_CARD_TYPE_PLAYER |