diff --git a/types/diacritic/.npmignore b/types/diacritic/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/diacritic/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/diacritic/diacritic-tests.ts b/types/diacritic/diacritic-tests.ts new file mode 100644 index 00000000000000..d89661981ff36c --- /dev/null +++ b/types/diacritic/diacritic-tests.ts @@ -0,0 +1,12 @@ +import diacritics = require("diacritic"); + +const cleaned = diacritics.clean("déjà vu"); +// $ExpectType string +cleaned; + +const mapped = diacritics.map["é"]; +// $ExpectType string +mapped; + +// @ts-expect-error +diacritics.clean(123); diff --git a/types/diacritic/index.d.ts b/types/diacritic/index.d.ts new file mode 100644 index 00000000000000..498ef80af916fd --- /dev/null +++ b/types/diacritic/index.d.ts @@ -0,0 +1,10 @@ +export as namespace Diacritics; + +interface DiacriticsStatic { + map: Record; + clean(input?: string | null): string; +} + +declare const diacritics: DiacriticsStatic; + +export = diacritics; diff --git a/types/diacritic/package.json b/types/diacritic/package.json new file mode 100644 index 00000000000000..cf13924148c64f --- /dev/null +++ b/types/diacritic/package.json @@ -0,0 +1,17 @@ +{ + "private": true, + "name": "@types/diacritic", + "version": "0.0.9999", + "projects": [ + "https://github.com/nijikokun/Diacritics.js" + ], + "devDependencies": { + "@types/diacritic": "workspace:." + }, + "owners": [ + { + "name": "TurtIeSocks", + "githubUsername": "TurtIeSocks" + } + ] +} diff --git a/types/diacritic/tsconfig.json b/types/diacritic/tsconfig.json new file mode 100644 index 00000000000000..f3ecea167ffd42 --- /dev/null +++ b/types/diacritic/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "node16", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "diacritic-tests.ts" + ] +} diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 3b59edf6dbc5f6..c3cd3c95a407d1 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -3680,7 +3680,7 @@ declare namespace Office { * * **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word * - * **Requirement set**: NestedAppAuth 1.1 + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/nested-app-auth-requirement-sets | NestedAppAuth 1.1} * * @returns Promise to the AuthContext object. */ @@ -3743,6 +3743,10 @@ declare namespace Office { } /** * Represents the user information which can be passed to the Microsoft Authentication Library for JavaScript (MSAL.js). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/nested-app-auth-requirement-sets | NestedAppAuth 1.1} */ interface AuthContext { /** diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 6ebd0c61e0ab0a..999a61f0452805 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -3680,7 +3680,7 @@ declare namespace Office { * * **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word * - * **Requirement set**: NestedAppAuth 1.1 + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/nested-app-auth-requirement-sets | NestedAppAuth 1.1} * * @returns Promise to the AuthContext object. */ @@ -3743,6 +3743,10 @@ declare namespace Office { } /** * Represents the user information which can be passed to the Microsoft Authentication Library for JavaScript (MSAL.js). + * + * @remarks + * + * **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/nested-app-auth-requirement-sets | NestedAppAuth 1.1} */ interface AuthContext { /**