mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings - Only use ambient mobules for global API's - Move single-file modules to a subdir with the same name so that we can provide a hand-written typing next to it (via package.json) - Delete all mentions of tns-core-modules.d.ts - Delete reference d.ts assembly build steps. Not needed anymore. - HACK! Use a <reference> for global typings in application.d.ts to avoid publishing a separate @types/tns-core-modules package. - Rename declarations.d.ts to tns-core-modules.d.ts to preserve JS project mappings in references.d.ts (the only place we use those)
This commit is contained in:
committed by
Hristo Deshev
parent
1af8c6ca8e
commit
b45cbe929b
98
tns-core-modules/text/formatted-string.d.ts
vendored
98
tns-core-modules/text/formatted-string.d.ts
vendored
@@ -1,64 +1,62 @@
|
||||
/**
|
||||
* Contains the FormattedString and Span classes, which are used to create a formatted (rich text) strings.
|
||||
*/
|
||||
declare module "text/formatted-string" {
|
||||
import { Span } from "text/span";
|
||||
import { ObservableArray } from "data/observable-array";
|
||||
import { ViewBase } from "ui/core/view";
|
||||
import { Color } from "color";
|
||||
import { FontStyle, FontWeight } from "ui/styling/font";
|
||||
import { TextDecoration } from "ui/text-base";
|
||||
import { Span } from "text/span";
|
||||
import { ObservableArray } from "data/observable-array";
|
||||
import { ViewBase } from "ui/core/view";
|
||||
import { Color } from "color";
|
||||
import { FontStyle, FontWeight } from "ui/styling/font";
|
||||
import { TextDecoration } from "ui/text-base";
|
||||
|
||||
export { Span };
|
||||
|
||||
/**
|
||||
* A class used to create a formatted (rich text) string.
|
||||
*/
|
||||
export class FormattedString extends ViewBase {
|
||||
|
||||
export { Span };
|
||||
|
||||
/**
|
||||
* A class used to create a formatted (rich text) string.
|
||||
* An observable collection of Span objects used to define common text properties.
|
||||
*/
|
||||
export class FormattedString extends ViewBase {
|
||||
public spans: ObservableArray<Span>;
|
||||
|
||||
/**
|
||||
* An observable collection of Span objects used to define common text properties.
|
||||
*/
|
||||
public spans: ObservableArray<Span>;
|
||||
/**
|
||||
* A human readable representation of the formatted string.
|
||||
*/
|
||||
public toString(): string;
|
||||
|
||||
/**
|
||||
* A human readable representation of the formatted string.
|
||||
*/
|
||||
public toString(): string;
|
||||
/**
|
||||
* Gets or sets the font family which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontFamily: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the font family which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontFamily: string;
|
||||
/**
|
||||
* Gets or sets the font size which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontSize: number;
|
||||
|
||||
/**
|
||||
* Gets or sets the font size which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontSize: number;
|
||||
/**
|
||||
* Gets or sets the font style which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontStyle: FontStyle;
|
||||
|
||||
/**
|
||||
* Gets or sets the font style which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontStyle: FontStyle;
|
||||
/**
|
||||
* Gets or sets the font weight which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontWeight: FontWeight;
|
||||
|
||||
/**
|
||||
* Gets or sets the font weight which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public fontWeight: FontWeight;
|
||||
/**
|
||||
* Gets or sets text decorations which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public textDecoration: TextDecoration;
|
||||
|
||||
/**
|
||||
* Gets or sets text decorations which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public textDecoration: TextDecoration;
|
||||
/**
|
||||
* Gets or sets the font foreground color which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public color: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the font foreground color which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public color: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the font background color which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public backgroundColor: Color;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Gets or sets the font background color which will be used for all spans that doesn't have a specific value.
|
||||
*/
|
||||
public backgroundColor: Color;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name" : "text",
|
||||
"main" : "text",
|
||||
"nativescript": {}
|
||||
"name" : "text",
|
||||
"main" : "text",
|
||||
"types" : "text.d.ts",
|
||||
"nativescript": {}
|
||||
}
|
||||
|
||||
92
tns-core-modules/text/span.d.ts
vendored
92
tns-core-modules/text/span.d.ts
vendored
@@ -1,55 +1,53 @@
|
||||
declare module "text/span" {
|
||||
import { Color } from "color";
|
||||
import { ViewBase } from "ui/core/view-base";
|
||||
import { FontStyle, FontWeight } from "ui/styling/font";
|
||||
import { TextDecoration } from "ui/text-base";
|
||||
import { Color } from "color";
|
||||
import { ViewBase } from "ui/core/view-base";
|
||||
import { FontStyle, FontWeight } from "ui/styling/font";
|
||||
import { TextDecoration } from "ui/text-base";
|
||||
|
||||
/**
|
||||
* A class used to create a single part of formatted string with a common text properties.
|
||||
*/
|
||||
export class Span extends ViewBase {
|
||||
/**
|
||||
* Gets or sets the font family of the span.
|
||||
*/
|
||||
public fontFamily: string;
|
||||
|
||||
/**
|
||||
* A class used to create a single part of formatted string with a common text properties.
|
||||
* Gets or sets the font size of the span.
|
||||
*/
|
||||
class Span extends ViewBase {
|
||||
/**
|
||||
* Gets or sets the font family of the span.
|
||||
*/
|
||||
public fontFamily: string;
|
||||
public fontSize: number;
|
||||
|
||||
/**
|
||||
* Gets or sets the font style of the span.
|
||||
*/
|
||||
public fontStyle: FontStyle;
|
||||
|
||||
/**
|
||||
* Gets or sets the font size of the span.
|
||||
*/
|
||||
public fontSize: number;
|
||||
|
||||
/**
|
||||
* Gets or sets the font style of the span.
|
||||
*/
|
||||
public fontStyle: FontStyle;
|
||||
/**
|
||||
* Gets or sets the font weight of the span.
|
||||
*/
|
||||
public fontWeight: FontWeight;
|
||||
|
||||
/**
|
||||
* Gets or sets the font weight of the span.
|
||||
*/
|
||||
public fontWeight: FontWeight;
|
||||
/**
|
||||
* Gets or sets text decorations for the span.
|
||||
*/
|
||||
public textDecoration: TextDecoration;
|
||||
|
||||
/**
|
||||
* Gets or sets text decorations for the span.
|
||||
*/
|
||||
public textDecoration: TextDecoration;
|
||||
/**
|
||||
* Gets or sets the font foreground color of the span.
|
||||
*/
|
||||
public color: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the font foreground color of the span.
|
||||
*/
|
||||
public color: Color;
|
||||
/**
|
||||
* Gets or sets the font background color of the span.
|
||||
*/
|
||||
public backgroundColor: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the font background color of the span.
|
||||
*/
|
||||
public backgroundColor: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the text for the span.
|
||||
*/
|
||||
public text: string;
|
||||
|
||||
//@private
|
||||
_setTextInternal(value: string): void;
|
||||
//@endprivate
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Gets or sets the text for the span.
|
||||
*/
|
||||
public text: string;
|
||||
|
||||
//@private
|
||||
_setTextInternal(value: string): void;
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
54
tns-core-modules/text/text.d.ts
vendored
54
tns-core-modules/text/text.d.ts
vendored
@@ -1,39 +1,37 @@
|
||||
/**
|
||||
* Defines specific text related enumerations.
|
||||
*/
|
||||
declare module "text" {
|
||||
/**
|
||||
* Defines the supported character encodings.
|
||||
*/
|
||||
export module encoding {
|
||||
/**
|
||||
* Defines the supported character encodings.
|
||||
* Denotes ISO-8859-1 character encoding.
|
||||
*/
|
||||
module encoding {
|
||||
/**
|
||||
* Denotes ISO-8859-1 character encoding.
|
||||
*/
|
||||
export var ISO_8859_1: any;
|
||||
export var ISO_8859_1: any;
|
||||
|
||||
/**
|
||||
* Denotes US_ASCII character encoding.
|
||||
*/
|
||||
export var US_ASCII: any;
|
||||
/**
|
||||
* Denotes US_ASCII character encoding.
|
||||
*/
|
||||
export var US_ASCII: any;
|
||||
|
||||
/**
|
||||
* Denotes UTF_16 character encoding.
|
||||
*/
|
||||
export var UTF_16: any;
|
||||
/**
|
||||
* Denotes UTF_16 character encoding.
|
||||
*/
|
||||
export var UTF_16: any;
|
||||
|
||||
/**
|
||||
* Denotes UTF_16BE character encoding.
|
||||
*/
|
||||
export var UTF_16BE: any;
|
||||
/**
|
||||
* Denotes UTF_16BE character encoding.
|
||||
*/
|
||||
export var UTF_16BE: any;
|
||||
|
||||
/**
|
||||
* Denotes UTF_16LE character encoding.
|
||||
*/
|
||||
export var UTF_16LE: any;
|
||||
/**
|
||||
* Denotes UTF_16LE character encoding.
|
||||
*/
|
||||
export var UTF_16LE: any;
|
||||
|
||||
/**
|
||||
* Denotes UTF_8 character encoding.
|
||||
*/
|
||||
export var UTF_8: any;
|
||||
}
|
||||
/**
|
||||
* Denotes UTF_8 character encoding.
|
||||
*/
|
||||
export var UTF_8: any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user