@jimka/typescript-ui / primitive / BorderLine
Class: BorderLine
Defined in: src/typescript/lib/primitive/BorderLine.ts:11
Represents a single side of a CSS border, holding its placement prefix, style, width, and color.
Extends
Object
Constructors
new BorderLine()
new BorderLine(
placement: string,
borderStyle?: BorderStyle,
width?: number,
color?: string): BorderLineDefined in: src/typescript/lib/primitive/BorderLine.ts:24
Parameters
placement
string
The CSS property prefix for this side (e.g. "border-top").
borderStyle?
Optional. The border style enum value. Defaults to BorderStyle.NONE.
width?
number
Optional. The border width in pixels. Defaults to 0.
color?
string
Optional. The border color string. Defaults to "black".
Returns
Overrides
Object.constructorProperties
constructor
constructor: Function;Defined in: node_modules/typescript/lib/lib.es5.d.ts:123
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
Inherited from
Object.constructorMethods
applyOnCSSRule()
applyOnCSSRule(rule: CSSStyleRule): voidDefined in: src/typescript/lib/primitive/BorderLine.ts:112
Writes this border side's width, style, and color properties onto the given CSS rule.
Parameters
rule
CSSStyleRule
The CSSStyleRule to apply the border properties to.
Returns
void
Remarks
Sets three separate CSS properties using the placement prefix: <placement>-width, <placement>-style, and <placement>-color. Thin wrapper over BorderLine.toStyle retained for callers that hold a pseudo-class rule (e.g. Button's :active rule).
getColor()
getColor(): stringDefined in: src/typescript/lib/primitive/BorderLine.ts:74
Returns the border color string.
Returns
string
The color value as a CSS color string.
getPlacement()
getPlacement(): stringDefined in: src/typescript/lib/primitive/BorderLine.ts:38
Returns the CSS property prefix for this side (e.g. "border-top").
Returns
string
The placement string passed at construction time.
getStyle()
getStyle(): BorderStyleDefined in: src/typescript/lib/primitive/BorderLine.ts:47
Returns the border style enum value.
Returns
The BorderStyle enum member for this border side.
getStyleString()
getStyleString(): stringDefined in: src/typescript/lib/primitive/BorderLine.ts:56
Returns the border style as a lowercase CSS string (e.g. "solid").
Returns
string
The lowercased name of the BorderStyle enum member.
getWidth()
getWidth(): numberDefined in: src/typescript/lib/primitive/BorderLine.ts:65
Returns the border width in pixels.
Returns
number
The width value in pixels.
hasOwnProperty()
hasOwnProperty(v: PropertyKey): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:138
Determines whether an object has a property with the specified name.
Parameters
v
PropertyKey
A property name.
Returns
boolean
Inherited from
Object.hasOwnPropertyisPrototypeOf()
isPrototypeOf(v: Object): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:144
Determines whether an object exists in another object's prototype chain.
Parameters
v
Object
Another object whose prototype chain is to be checked.
Returns
boolean
Inherited from
Object.isPrototypeOfpropertyIsEnumerable()
propertyIsEnumerable(v: PropertyKey): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:150
Determines whether a specified property is enumerable.
Parameters
v
PropertyKey
A property name.
Returns
boolean
Inherited from
Object.propertyIsEnumerablerender()
render(): stringDefined in: src/typescript/lib/primitive/BorderLine.ts:98
Returns the border as a CSS shorthand string (e.g. "1px solid black").
Returns
string
A CSS border shorthand value in "<width>px <style> <color>" format.
set()
set(
borderStyle: BorderStyle,
width: number,
color: string): thisDefined in: src/typescript/lib/primitive/BorderLine.ts:85
Sets the border style, width, and color.
Parameters
borderStyle
The new BorderStyle enum value.
width
number
The new border width in pixels.
color
string
The new border color string.
Returns
this
toLocaleString()
toLocaleString(): stringDefined in: node_modules/typescript/lib/lib.es5.d.ts:129
Returns a date converted to a string using the current locale.
Returns
string
Inherited from
Object.toLocaleStringtoString()
toString(): stringDefined in: node_modules/typescript/lib/lib.es5.d.ts:126
Returns a string representation of an object.
Returns
string
Inherited from
Object.toStringtoStyle()
toStyle(): {}Defined in: src/typescript/lib/primitive/BorderLine.ts:133
Returns this side's width / style / color as a Style map so callers can batch the writes through Component.setElementCSSRules rather than mutating a live CSSStyleRule.
Returns
{}A map of CSS property names to string values.
valueOf()
valueOf(): ObjectDefined in: node_modules/typescript/lib/lib.es5.d.ts:132
Returns the primitive value of the specified object.
Returns
Object
Inherited from
Object.valueOfassign()
Call Signature
static assign<T, U>(target: T, source: U): T & UDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:284
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
• T extends {}
• U
Parameters
target
T
The target object to copy to.
source
U
The source object from which to copy properties.
Returns
T & U
Inherited from
Object.assignCall Signature
static assign<T, U, V>(
target: T,
source1: U,
source2: V): T & U & VDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:293
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
• T extends {}
• U
• V
Parameters
target
T
The target object to copy to.
source1
U
The first source object from which to copy properties.
source2
V
The second source object from which to copy properties.
Returns
T & U & V
Inherited from
Object.assignCall Signature
static assign<T, U, V, W>(
target: T,
source1: U,
source2: V,
source3: W): T & U & V & WDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:303
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Type Parameters
• T extends {}
• U
• V
• W
Parameters
target
T
The target object to copy to.
source1
U
The first source object from which to copy properties.
source2
V
The second source object from which to copy properties.
source3
W
The third source object from which to copy properties.
Returns
T & U & V & W
Inherited from
Object.assignCall Signature
static assign(target: object, ...sources: any[]): anyDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:311
Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.
Parameters
target
object
The target object to copy to.
sources
...any[]
One or more source objects from which to copy properties
Returns
any
Inherited from
Object.assigncreate()
Call Signature
static create(o: null | object): anyDefined in: node_modules/typescript/lib/lib.es5.d.ts:186
Creates an object that has the specified prototype or that has null prototype.
Parameters
o
Object to use as a prototype. May be null.
null | object
Returns
any
Inherited from
Object.createCall Signature
static create(o: null | object, properties: PropertyDescriptorMap & ThisType<any>): anyDefined in: node_modules/typescript/lib/lib.es5.d.ts:193
Creates an object that has the specified prototype, and that optionally contains specified properties.
Parameters
o
Object to use as a prototype. May be null
null | object
properties
PropertyDescriptorMap & ThisType<any>
JavaScript object that contains one or more property descriptors.
Returns
any
Inherited from
Object.createdefineProperties()
static defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): TDefined in: node_modules/typescript/lib/lib.es5.d.ts:208
Adds one or more properties to an object, and/or modifies attributes of existing properties.
Type Parameters
• T
Parameters
o
T
Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
properties
PropertyDescriptorMap & ThisType<any>
JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
Returns
T
Inherited from
Object.definePropertiesdefineProperty()
static defineProperty<T>(
o: T,
p: PropertyKey,
attributes: PropertyDescriptor & ThisType<any>): TDefined in: node_modules/typescript/lib/lib.es5.d.ts:201
Adds a property to an object, or modifies attributes of an existing property.
Type Parameters
• T
Parameters
o
T
Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
p
PropertyKey
The property name.
attributes
PropertyDescriptor & ThisType<any>
Descriptor for the property. It can be for a data property or an accessor property.
Returns
T
Inherited from
Object.definePropertyentries()
Call Signature
static entries<T>(o: {} | ArrayLike<T>): [string, T][]Defined in: node_modules/typescript/lib/lib.es2017.object.d.ts:34
Returns an array of key/values of the enumerable own properties of an object
Type Parameters
• T
Parameters
o
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
{} | ArrayLike<T>
Returns
[string, T][]
Inherited from
Object.entriesCall Signature
static entries(o: {}): [string, any][]Defined in: node_modules/typescript/lib/lib.es2017.object.d.ts:40
Returns an array of key/values of the enumerable own properties of an object
Parameters
o
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
[string, any][]
Inherited from
Object.entriesfreeze()
Call Signature
static freeze<T>(f: T): TDefined in: node_modules/typescript/lib/lib.es5.d.ts:220
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
• T extends Function
Parameters
f
T
Object on which to lock the attributes.
Returns
T
Inherited from
Object.freezeCall Signature
static freeze<T, U>(o: T): Readonly<T>Defined in: node_modules/typescript/lib/lib.es5.d.ts:226
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
• T extends {}
• U extends string | number | bigint | boolean | symbol
Parameters
o
T
Object on which to lock the attributes.
Returns
Readonly<T>
Inherited from
Object.freezeCall Signature
static freeze<T>(o: T): Readonly<T>Defined in: node_modules/typescript/lib/lib.es5.d.ts:232
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
Type Parameters
• T
Parameters
o
T
Object on which to lock the attributes.
Returns
Readonly<T>
Inherited from
Object.freezefromEntries()
Call Signature
static fromEntries<T>(entries: Iterable<readonly [PropertyKey, T]>): {}Defined in: node_modules/typescript/lib/lib.es2019.object.d.ts:24
Returns an object created by key-value entries for properties and methods
Type Parameters
• T = any
Parameters
entries
Iterable<readonly [PropertyKey, T]>
An iterable object that contains key-value entries for properties and methods.
Returns
{}Inherited from
Object.fromEntriesCall Signature
static fromEntries(entries: Iterable<readonly any[]>): anyDefined in: node_modules/typescript/lib/lib.es2019.object.d.ts:30
Returns an object created by key-value entries for properties and methods
Parameters
entries
Iterable<readonly any[]>
An iterable object that contains key-value entries for properties and methods.
Returns
any
Inherited from
Object.fromEntriesgetOwnPropertyDescriptor()
static getOwnPropertyDescriptor(o: any, p: PropertyKey): undefined | PropertyDescriptorDefined in: node_modules/typescript/lib/lib.es5.d.ts:173
Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
Parameters
o
any
Object that contains the property.
p
PropertyKey
Name of the property.
Returns
undefined | PropertyDescriptor
Inherited from
Object.getOwnPropertyDescriptorgetOwnPropertyDescriptors()
static getOwnPropertyDescriptors<T>(o: T): { [P in string | number | symbol]: TypedPropertyDescriptor<T[P]> } & {}Defined in: node_modules/typescript/lib/lib.es2017.object.d.ts:46
Returns an object containing all own property descriptors of an object
Type Parameters
• T
Parameters
o
T
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
{ [P in string | number | symbol]: TypedPropertyDescriptor<T[P]> } & {}
Inherited from
Object.getOwnPropertyDescriptorsgetOwnPropertyNames()
static getOwnPropertyNames(o: any): string[]Defined in: node_modules/typescript/lib/lib.es5.d.ts:180
Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
Parameters
o
any
Object that contains the own properties.
Returns
string[]
Inherited from
Object.getOwnPropertyNamesgetOwnPropertySymbols()
static getOwnPropertySymbols(o: any): symbol[]Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:317
Returns an array of all symbol properties found directly on object o.
Parameters
o
any
Object to retrieve the symbols from.
Returns
symbol[]
Inherited from
Object.getOwnPropertySymbolsgetPrototypeOf()
static getPrototypeOf(o: any): anyDefined in: node_modules/typescript/lib/lib.es5.d.ts:165
Returns the prototype of an object.
Parameters
o
any
The object that references the prototype.
Returns
any
Inherited from
Object.getPrototypeOfgroupBy()
static groupBy<K, T>(items: Iterable<T>, keySelector: (item: T, index: number) => K): Partial<Record<K, T[]>>Defined in: node_modules/typescript/lib/lib.es2024.object.d.ts:23
Groups members of an iterable according to the return value of the passed callback.
Type Parameters
• K extends PropertyKey
• T
Parameters
items
Iterable<T>
An iterable.
keySelector
(item: T, index: number) => K
A callback which will be invoked for each item in items.
Returns
Partial<Record<K, T[]>>
Inherited from
Object.groupByhasOwn()
static hasOwn(o: object, v: PropertyKey): booleanDefined in: node_modules/typescript/lib/lib.es2022.object.d.ts:23
Determines whether an object has a property with the specified name.
Parameters
o
object
An object.
v
PropertyKey
A property name.
Returns
boolean
Inherited from
Object.hasOwnis()
static is(value1: any, value2: any): booleanDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:330
Returns true if the values are the same value, false otherwise.
Parameters
value1
any
The first value.
value2
any
The second value.
Returns
boolean
Inherited from
Object.isisExtensible()
static isExtensible(o: any): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:256
Returns a value that indicates whether new properties can be added to an object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
Object.isExtensibleisFrozen()
static isFrozen(o: any): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:250
Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
Object.isFrozenisSealed()
static isSealed(o: any): booleanDefined in: node_modules/typescript/lib/lib.es5.d.ts:244
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
Parameters
o
any
Object to test.
Returns
boolean
Inherited from
Object.isSealedkeys()
Call Signature
static keys(o: object): string[]Defined in: node_modules/typescript/lib/lib.es5.d.ts:262
Returns the names of the enumerable string properties and methods of an object.
Parameters
o
object
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
string[]
Inherited from
Object.keysCall Signature
static keys(o: {}): string[]Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:323
Returns the names of the enumerable string properties and methods of an object.
Parameters
o
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
string[]
Inherited from
Object.keyspreventExtensions()
static preventExtensions<T>(o: T): TDefined in: node_modules/typescript/lib/lib.es5.d.ts:238
Prevents the addition of new properties to an object.
Type Parameters
• T
Parameters
o
T
Object to make non-extensible.
Returns
T
Inherited from
Object.preventExtensionsseal()
static seal<T>(o: T): TDefined in: node_modules/typescript/lib/lib.es5.d.ts:214
Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
Type Parameters
• T
Parameters
o
T
Object on which to lock the attributes.
Returns
T
Inherited from
Object.sealsetPrototypeOf()
static setPrototypeOf(o: any, proto: null | object): anyDefined in: node_modules/typescript/lib/lib.es2015.core.d.ts:337
Sets the prototype of a specified object o to object proto or null. Returns the object o.
Parameters
o
any
The object to change its prototype.
proto
The value of the new prototype or null.
null | object
Returns
any
Inherited from
Object.setPrototypeOfvalues()
Call Signature
static values<T>(o: {} | ArrayLike<T>): T[]Defined in: node_modules/typescript/lib/lib.es2017.object.d.ts:22
Returns an array of values of the enumerable own properties of an object
Type Parameters
• T
Parameters
o
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
{} | ArrayLike<T>
Returns
T[]
Inherited from
Object.valuesCall Signature
static values(o: {}): any[]Defined in: node_modules/typescript/lib/lib.es2017.object.d.ts:28
Returns an array of values of the enumerable own properties of an object
Parameters
o
Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
Returns
any[]
Inherited from
Object.values