Skip to content

Commit ac160f6

Browse files
authored
Merge pull request #401 from marp-team/css-nesting-type-definition
Update type definition to add `cssNesting` constructor option
2 parents 7e9fac4 + ec51fca commit ac160f6

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
- Update type definition to add `cssNesting` constructor option ([#401](https://github.com/marp-team/marpit/pull/401))
8+
59
## v3.1.0 - 2024-08-30
610

711
### Added

index.d.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ declare namespace Marpit {
1010
anchor?: boolean | AnchorCallback
1111
container?: false | Element | Element[]
1212
cssContainerQuery?: boolean | string | string[]
13+
cssNesting?: boolean
1314
headingDivider?: false | HeadingDivider | HeadingDivider[]
1415
lang?: string
1516
looseYAML?: boolean
@@ -47,15 +48,20 @@ declare namespace Marpit {
4748
...params: P
4849
) => void
4950

51+
type ThemeMetaType = {
52+
[key: string]: StringConstructor | ArrayConstructor
53+
}
54+
5055
type ThemeReservedMeta = {
5156
theme: string
5257
}
5358

54-
type ThemeMetaType = {
55-
[key: string]: StringConstructor | ArrayConstructor
59+
interface ThemeSetOptions {
60+
cssNesting?: boolean
5661
}
5762

5863
type ThemeOptions = {
64+
cssNesting?: boolean
5965
metaType?: ThemeMetaType
6066
}
6167

@@ -126,8 +132,9 @@ declare namespace Marpit {
126132
}
127133

128134
export class ThemeSet {
129-
constructor()
135+
constructor(opts?: ThemeSetOptions)
130136

137+
cssNesting: boolean
131138
default: Theme | undefined
132139
metaType: ThemeMetaType
133140

0 commit comments

Comments
 (0)