mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #4307 from chbrown/unorm
Add type declarations for unorm: both importable module and ambient var
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/// <reference path="unorm.d.ts" />
|
||||
import unorm = require("unorm");
|
||||
|
||||
function listNormalizations(raw: string) {
|
||||
return [
|
||||
unorm.nfd(raw),
|
||||
unorm.nfkd(raw),
|
||||
unorm.nfc(raw),
|
||||
unorm.nfkc(raw),
|
||||
];
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for unorm 1.3.3
|
||||
// Project: https://github.com/walling/unorm
|
||||
// Definitions by: Christopher Brown <https://github.com/chbrown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module unorm {
|
||||
interface Static {
|
||||
nfd(str: string): string;
|
||||
nfkd(str: string): string;
|
||||
nfc(str: string): string;
|
||||
nfkc(str: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare var unorm: unorm.Static;
|
||||
|
||||
declare module "unorm" {
|
||||
export = unorm;
|
||||
}
|
||||
Reference in New Issue
Block a user