From 44568023cdd5d3cb0e01198064ab9e90fcf7e52e Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 30 Mar 2023 19:54:33 +0100 Subject: [PATCH] Add documentation to basedOn --- src/file/styles/style/style.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/file/styles/style/style.ts b/src/file/styles/style/style.ts index 65e3202dd0..e6c78780d4 100644 --- a/src/file/styles/style/style.ts +++ b/src/file/styles/style/style.ts @@ -41,6 +41,13 @@ export interface IStyleAttributes { export interface IStyleOptions { readonly name?: string; + /** + * Specifies the style upon which the current style is based-that is, the style from which the current style inherits. It is the mechanism for implementing style inheritance. + * Note that if the type of the current style must match the type of the style upon which it is based or the basedOn element will be ignored. + * However, if the current style is a numbering style, then the `basedOn` element is ignored. + * + * **WARNING**: You cannot set `basedOn` to be the same as `name`. This is akin to inheriting from itself. This creates a cyclic dependency and cause undesirable behavior. + */ readonly basedOn?: string; readonly next?: string; readonly link?: string;