Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions types/diacritic/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
12 changes: 12 additions & 0 deletions types/diacritic/diacritic-tests.ts
Original file line number Diff line number Diff line change
@@ -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);
10 changes: 10 additions & 0 deletions types/diacritic/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export as namespace Diacritics;

interface DiacriticsStatic {
map: Record<string, string>;
clean(input?: string | null): string;
}

declare const diacritics: DiacriticsStatic;

export = diacritics;
17 changes: 17 additions & 0 deletions types/diacritic/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
19 changes: 19 additions & 0 deletions types/diacritic/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
6 changes: 5 additions & 1 deletion types/office-js-preview/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 {
/**
Expand Down
6 changes: 5 additions & 1 deletion types/office-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 {
/**
Expand Down