mirror of
https://github.com/zoriya/ags.git
synced 2026-06-09 04:46:08 +00:00
Initialize with the GNOME Typescript Template
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
declare function _(id: string): string;
|
||||
declare function print(args: string): void;
|
||||
declare function log(obj: object, others?: object[]): void;
|
||||
declare function log(msg: string, subsitutions?: any[]): void;
|
||||
|
||||
declare const pkg: {
|
||||
version: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
declare module console {
|
||||
export function error(obj: object, others?: object[]): void;
|
||||
export function error(msg: string, subsitutions?: any[]): void;
|
||||
}
|
||||
|
||||
declare interface String {
|
||||
format(...replacements: string[]): string;
|
||||
format(...replacements: number[]): string;
|
||||
}
|
||||
declare interface Number {
|
||||
toFixed(digits: number): number;
|
||||
}
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
export namespace Gettext {
|
||||
export enum LocaleCategory {
|
||||
CTYPE = 0,
|
||||
NUMERIC = 1,
|
||||
TIME = 2,
|
||||
COLLATE = 3,
|
||||
MONETARY = 4,
|
||||
MESSAGES = 5,
|
||||
ALL = 6,
|
||||
}
|
||||
|
||||
export function setlocale(category: LocaleCategory, locale: string | null): string | null;
|
||||
export function textdomain(domainName: string): void;
|
||||
export function bindtextdomain(domainName: string, dirName: string): void;
|
||||
|
||||
export function gettext(msgid: string): string;
|
||||
export function dgettext(domainName: string | null, msgid: string): string;
|
||||
export function dcgettext(domainName: string | null, msgid: string, category: LocaleCategory): string;
|
||||
|
||||
export function ngettext(msgid1: string, msgid2: string, n: number): string;
|
||||
export function dngettext(domainName: string | null, msgid1: string, msgid2: string, n: number): string;
|
||||
|
||||
export function pgettext(context: string | null, msgid: string): string;
|
||||
export function dpgettext(domainName: string | null, context: string | null, msgid: string): string;
|
||||
|
||||
export class GettextObject {
|
||||
gettext(msgid: string): string;
|
||||
ngettext(msgid1: string, msgid2: string, n: number): string;
|
||||
pgettext(context: string | null, msgid: string): string;
|
||||
}
|
||||
|
||||
export function domain(domainName: string | null): GettextObject;
|
||||
}
|
||||
|
||||
export default Gettext;
|
||||
Reference in New Issue
Block a user