Skip to content

Commit

Permalink
fix: make keys optional in type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jul 25, 2024
1 parent 62f76af commit faf910b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions types/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default interface Config {
/**
* Configure build settings.
*/
build: BuildConfig;
build?: BuildConfig;

/**
Define a string that will be prepended to sources and hrefs in your HTML and CSS.
Expand Down Expand Up @@ -98,7 +98,7 @@ export default interface Config {
/**
* Configure how CSS is handled.
*/
css: {
css?: {
/**
* Configure CSS inlining.
*/
Expand Down Expand Up @@ -184,7 +184,7 @@ export default interface Config {
* }
* ```
*/
filters: boolean | Record<string, (str: string) => string>;
filters?: boolean | Record<string, (str: string) => string>;

/**
* Define variables outside of the `page` object.
Expand Down Expand Up @@ -473,7 +473,7 @@ export default interface Config {
* }
* ```
*/
beforeCreate: Events['beforeCreate'];
beforeCreate?: Events['beforeCreate'];

/**
* Runs after the Template's config has been computed, but just before it is compiled.
Expand All @@ -492,7 +492,7 @@ export default interface Config {
* }
* ```
*/
beforeRender: Events['beforeRender'];
beforeRender?: Events['beforeRender'];

/**
* Runs after the Template has been compiled, but before any Transformers have been applied.
Expand All @@ -511,7 +511,7 @@ export default interface Config {
* }
* ```
*/
afterRender: Events['afterRender'];
afterRender?: Events['afterRender'];

/**
* Runs after all Transformers have been applied, just before the final HTML is returned.
Expand All @@ -530,7 +530,7 @@ export default interface Config {
* }
* ```
*/
afterTransformers: Events['afterTransformers'];
afterTransformers?: Events['afterTransformers'];

/**
* Runs after all Templates have been compiled and output to disk.
Expand All @@ -547,7 +547,7 @@ export default interface Config {
* }
* ```
*/
afterBuild: Events['afterBuild'];
afterBuild?: Events['afterBuild'];

[key: string]: any;
}
2 changes: 1 addition & 1 deletion types/css/purge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default interface PurgeCSSConfig {
* }
* ```
*/
doNotRemoveHTMLCommentsWhoseOpeningTagContains: Opts['doNotRemoveHTMLCommentsWhoseOpeningTagContains'];
doNotRemoveHTMLCommentsWhoseOpeningTagContains?: Opts['doNotRemoveHTMLCommentsWhoseOpeningTagContains'];

/**
* Rename all classes and IDs in both your `<style>` tags and your body HTML elements,
Expand Down

0 comments on commit faf910b

Please sign in to comment.