Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update type definition to add cssNesting constructor option #401

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

- Update type definition to add `cssNesting` constructor option ([#401](https://github.com/marp-team/marpit/pull/401))

## v3.1.0 - 2024-08-30

### Added
Expand Down
13 changes: 10 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare namespace Marpit {
anchor?: boolean | AnchorCallback
container?: false | Element | Element[]
cssContainerQuery?: boolean | string | string[]
cssNesting?: boolean
headingDivider?: false | HeadingDivider | HeadingDivider[]
lang?: string
looseYAML?: boolean
Expand Down Expand Up @@ -47,15 +48,20 @@ declare namespace Marpit {
...params: P
) => void

type ThemeMetaType = {
[key: string]: StringConstructor | ArrayConstructor
}

type ThemeReservedMeta = {
theme: string
}

type ThemeMetaType = {
[key: string]: StringConstructor | ArrayConstructor
interface ThemeSetOptions {
cssNesting?: boolean
}

type ThemeOptions = {
cssNesting?: boolean
metaType?: ThemeMetaType
}

Expand Down Expand Up @@ -126,8 +132,9 @@ declare namespace Marpit {
}

export class ThemeSet {
constructor()
constructor(opts?: ThemeSetOptions)

cssNesting: boolean
default: Theme | undefined
metaType: ThemeMetaType

Expand Down