Skip to content

Class: CssDocIndex

Defined in: packages/index/src/index.ts:139

A queryable view over the parsed records.

Constructors

Constructor

ts
new CssDocIndex(records, file?): CssDocIndex;

Defined in: packages/index/src/index.ts:145

Parameters

records

RecordInfo[]

file?

string

Returns

CssDocIndex

Properties

file?

ts
readonly optional file?: string;

Defined in: packages/index/src/index.ts:140


records

ts
readonly records: readonly RecordInfo[];

Defined in: packages/index/src/index.ts:141

Accessors

entries

Get Signature

ts
get entries(): CssDocEntry[];

Defined in: packages/index/src/index.ts:155

Every documented record's model entry.

Returns

CssDocEntry[]

Methods

allCustomProperties()

ts
allCustomProperties(): object[];

Defined in: packages/index/src/index.ts:217

Every declared custom property, paired with the record that declares it (for var(...) completion).

Returns

object[]


allFunctions()

ts
allFunctions(): object[];

Defined in: packages/index/src/index.ts:224

Every custom function, paired with its record.

Returns

object[]


animationsFor()

ts
animationsFor(name): CssAnimation[];

Defined in: packages/index/src/index.ts:193

Parameters

name

string

Returns

CssAnimation[]


componentForClass()

ts
componentForClass(className): CssDocEntry | undefined;

Defined in: packages/index/src/index.ts:160

The record whose base class matches className (with or without a leading dot).

Parameters

className

string

Returns

CssDocEntry | undefined


conditionsFor()

ts
conditionsFor(name): CssCondition[];

Defined in: packages/index/src/index.ts:189

Parameters

name

string

Returns

CssCondition[]


customPropertiesFor()

ts
customPropertiesFor(name): CssPropertyDeclared[];

Defined in: packages/index/src/index.ts:177

Parameters

name

string

Returns

CssPropertyDeclared[]


deprecationOf()

ts
deprecationOf(base, modifier): 
  | {
  canonical?: string;
  note?: string;
}
  | undefined;

Defined in: packages/index/src/index.ts:210

The deprecation of a modifier on base, if it is deprecated.

Parameters

base

string

modifier

string

Returns

| { canonical?: string; note?: string; } | undefined


functionsFor()

ts
functionsFor(name): CssFunction[];

Defined in: packages/index/src/index.ts:181

Parameters

name

string

Returns

CssFunction[]


isModifier()

ts
isModifier(base, modifier): boolean;

Defined in: packages/index/src/index.ts:202

Whether modifier (with or without a leading dot) is a documented modifier of base.

Parameters

base

string

modifier

string

Returns

boolean


location()

ts
location(name, key?): Location | undefined;

Defined in: packages/index/src/index.ts:231

The definition location of a record member (or the record itself), if a span is known.

Parameters

name

string

key?

string = "record"

Returns

Location | undefined


modifiersFor()

ts
modifiersFor(name): CssModifier[];

Defined in: packages/index/src/index.ts:169

Parameters

name

string

Returns

CssModifier[]


partsFor()

ts
partsFor(name): CssPart[];

Defined in: packages/index/src/index.ts:173

Parameters

name

string

Returns

CssPart[]


recordInfo()

ts
recordInfo(name): RecordInfo | undefined;

Defined in: packages/index/src/index.ts:165

The full RecordInfo for a record name.

Parameters

name

string

Returns

RecordInfo | undefined


statesFor()

ts
statesFor(name): CssState[];

Defined in: packages/index/src/index.ts:185

Parameters

name

string

Returns

CssState[]


structureFor()

ts
structureFor(name): StructureNode[] | undefined;

Defined in: packages/index/src/index.ts:197

Parameters

name

string

Returns

StructureNode[] | undefined


toManifest()

ts
toManifest(): CssDocManifest;

Defined in: packages/index/src/index.ts:239

A stable, serializable snapshot.

Returns

CssDocManifest

Released under the MIT License