Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyo committed Dec 17, 2023
1 parent 087068d commit e79b19c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/ISOToLanguage.ts → src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ function getAllLanguageCodesByISO(isos: string[], type?: string): string[] {
* Retrieves all items of a specified type.
*
* @param {string} type - Type of items to retrieve. It Can be "iso", "languages",
* "names", "original", "language-codes", or "locales". If no type is provided, return the isoList.
* "names", "original", "language-codes", or "locale". If no type is provided, return the isoList.
* @return Depending on the type parameter, either a list of ISOs, languages,
* names, original names, or the isoList.
*/
Expand Down
19 changes: 1 addition & 18 deletions src/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { isoList } from './iso'
import ISOToLanguage from './ISOToLanguage'

// The ISO language code type e.g. 'UK' 'US'
type ISOCode = keyof typeof isoList
Expand All @@ -17,20 +16,4 @@ interface CountryData extends Country {
code: ISOCode
}

type IsoDataType = 'iso' | 'language' | 'name' | 'original' | 'language-code' | 'locales'

declare module ISOToLanguage {
interface ISOToLanguage {
isValidIso: typeof isValidIso
format: typeof format
iso: typeof iso
getCountry: typeof getCountry
getCountryData: typeof getCountryData
getCountriesByISO: typeof getCountriesByISO
getCountriesByLanguage: typeof getCountriesByLanguage
getAsKey: typeof getAsKey
getAll: typeof getAll
getAllLanguagesByISO: typeof getAllLanguagesByISO
getAllLanguageCodesByISO: typeof getAllLanguageCodesByISO
}
}
type IsoDataType = 'iso' | 'language' | 'name' | 'original' | 'language-code' | 'locale'
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin')

const webpackConfig = {
entry: {
'ISOToLanguage': path.resolve(__dirname, 'src/ISOToLanguage.ts'),
'ISOToLanguage': path.resolve(__dirname, 'src/index.ts'),
},
module: {
rules: [
Expand Down

0 comments on commit e79b19c

Please sign in to comment.