Skip to content

Commit

Permalink
[Word] Fix generatedocs error re ImportedStylesConflictBehavior (#2150)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizabethSamuel-MSFT authored Dec 5, 2024
1 parent a2112eb commit 2f61cf2
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 41 deletions.
13 changes: 10 additions & 3 deletions docs/docs-ref-autogen/word_1_6/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@ methods:
return:
type: '<xref uid="word!Word.StyleCollection:class" />'
description: ''
- name: importStylesFromJson(stylesJson)
- name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
uid: 'word!Word.Document#importStylesFromJson:member(1)'
package: word!
fullName: importStylesFromJson(stylesJson)
fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
summary: Import styles from a JSON-formatted string.
remarks: >-
\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
Expand Down Expand Up @@ -696,11 +696,18 @@ methods:
isPreview: false
isDeprecated: false
syntax:
content: 'importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;'
content: >-
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior):
OfficeExtension.ClientResult<string[]>;
parameters:
- id: stylesJson
description: Required. A JSON-formatted string representing the styles.
type: string
- id: importedStylesConflictBehavior
description: >-
Optional. Specifies how to handle any imported styles with the same name as existing styles in the current
document.
type: Word.ImportedStylesConflictBehavior
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" />&lt;string[]&gt;'
description: ''
Expand Down
13 changes: 10 additions & 3 deletions docs/docs-ref-autogen/word_1_7/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ methods:
return:
type: '<xref uid="word!Word.StyleCollection:class" />'
description: ''
- name: importStylesFromJson(stylesJson)
- name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
uid: 'word!Word.Document#importStylesFromJson:member(1)'
package: word!
fullName: importStylesFromJson(stylesJson)
fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
summary: Import styles from a JSON-formatted string.
remarks: >-
\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
Expand Down Expand Up @@ -713,11 +713,18 @@ methods:
isPreview: false
isDeprecated: false
syntax:
content: 'importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;'
content: >-
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior):
OfficeExtension.ClientResult<string[]>;
parameters:
- id: stylesJson
description: Required. A JSON-formatted string representing the styles.
type: string
- id: importedStylesConflictBehavior
description: >-
Optional. Specifies how to handle any imported styles with the same name as existing styles in the current
document.
type: Word.ImportedStylesConflictBehavior
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" />&lt;string[]&gt;'
description: ''
Expand Down
13 changes: 10 additions & 3 deletions docs/docs-ref-autogen/word_1_8/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ methods:
return:
type: '<xref uid="word!Word.StyleCollection:class" />'
description: ''
- name: importStylesFromJson(stylesJson)
- name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
uid: 'word!Word.Document#importStylesFromJson:member(1)'
package: word!
fullName: importStylesFromJson(stylesJson)
fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
summary: Import styles from a JSON-formatted string.
remarks: >-
\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
Expand Down Expand Up @@ -713,11 +713,18 @@ methods:
isPreview: false
isDeprecated: false
syntax:
content: 'importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;'
content: >-
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior):
OfficeExtension.ClientResult<string[]>;
parameters:
- id: stylesJson
description: Required. A JSON-formatted string representing the styles.
type: string
- id: importedStylesConflictBehavior
description: >-
Optional. Specifies how to handle any imported styles with the same name as existing styles in the current
document.
type: Word.ImportedStylesConflictBehavior
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" />&lt;string[]&gt;'
description: ''
Expand Down
13 changes: 10 additions & 3 deletions docs/docs-ref-autogen/word_1_9/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ methods:
return:
type: '<xref uid="word!Word.StyleCollection:class" />'
description: ''
- name: importStylesFromJson(stylesJson)
- name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
uid: 'word!Word.Document#importStylesFromJson:member(1)'
package: word!
fullName: importStylesFromJson(stylesJson)
fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
summary: Import styles from a JSON-formatted string.
remarks: >-
\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
Expand Down Expand Up @@ -713,11 +713,18 @@ methods:
isPreview: false
isDeprecated: false
syntax:
content: 'importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;'
content: >-
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior):
OfficeExtension.ClientResult<string[]>;
parameters:
- id: stylesJson
description: Required. A JSON-formatted string representing the styles.
type: string
- id: importedStylesConflictBehavior
description: >-
Optional. Specifies how to handle any imported styles with the same name as existing styles in the current
document.
type: Word.ImportedStylesConflictBehavior
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" />&lt;string[]&gt;'
description: ''
Expand Down
13 changes: 10 additions & 3 deletions docs/docs-ref-autogen/word_online/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ methods:
return:
type: '<xref uid="word!Word.StyleCollection:class" />'
description: ''
- name: importStylesFromJson(stylesJson)
- name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
uid: 'word!Word.Document#importStylesFromJson:member(1)'
package: word!
fullName: importStylesFromJson(stylesJson)
fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)'
summary: Import styles from a JSON-formatted string.
remarks: >-
\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
Expand Down Expand Up @@ -713,11 +713,18 @@ methods:
isPreview: false
isDeprecated: false
syntax:
content: 'importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;'
content: >-
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior):
OfficeExtension.ClientResult<string[]>;
parameters:
- id: stylesJson
description: Required. A JSON-formatted string representing the styles.
type: string
- id: importedStylesConflictBehavior
description: >-
Optional. Specifies how to handle any imported styles with the same name as existing styles in the current
document.
type: Word.ImportedStylesConflictBehavior
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" />&lt;string[]&gt;'
description: ''
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/word-1_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
|[Body](/javascript/api/word/word.body)|[getTrackedChanges()](/javascript/api/word/word.body#word-word-body-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the body.|
|[ContentControl](/javascript/api/word/word.contentcontrol)|[getTrackedChanges()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the content control.|
|[Document](/javascript/api/word/word.document)|[getParagraphByUniqueLocalId(id: string)](/javascript/api/word/word.document#word-word-document-getparagraphbyuniquelocalid-member(1))|Gets the paragraph by its unique local ID.|
||[importStylesFromJson(stylesJson: string)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.|
||[importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.|
||[onParagraphAdded](/javascript/api/word/word.document#word-word-document-onparagraphadded-member)|Occurs when the user adds new paragraphs.|
||[onParagraphChanged](/javascript/api/word/word.document#word-word-document-onparagraphchanged-member)|Occurs when the user changes paragraphs.|
||[onParagraphDeleted](/javascript/api/word/word.document#word-word-document-onparagraphdeleted-member)|Occurs when the user deletes paragraphs.|
Expand Down
1 change: 0 additions & 1 deletion docs/includes/word-desktop-1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
||[outsideBorderType](/javascript/api/word/word.bordercollection#word-word-bordercollection-outsidebordertype-member)|Specifies the border type of the outside borders.|
||[outsideBorderWidth](/javascript/api/word/word.bordercollection#word-word-bordercollection-outsideborderwidth-member)|Specifies the width of the outside borders.|
|[Document](/javascript/api/word/word.document)|[compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions)](/javascript/api/word/word.document#word-word-document-compare-member(1))|Displays revision marks that indicate where the specified document differs from another document.|
||[importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.|
|[DocumentCompareOptions](/javascript/api/word/word.documentcompareoptions)|[addToRecentFiles](/javascript/api/word/word.documentcompareoptions#word-word-documentcompareoptions-addtorecentfiles-member)|True adds the document to the list of recently used files on the File menu.|
||[authorName](/javascript/api/word/word.documentcompareoptions#word-word-documentcompareoptions-authorname-member)|The reviewer name associated with the differences generated by the comparison.|
||[compareTarget](/javascript/api/word/word.documentcompareoptions#word-word-documentcompareoptions-comparetarget-member)|The target document for the comparison.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2927,9 +2927,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2858,9 +2858,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2425,9 +2425,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2425,9 +2425,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2858,9 +2858,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2927,9 +2927,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,9 +3083,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,9 +3083,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,9 +3083,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,9 +3083,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,9 +3083,9 @@ export declare namespace Word {
* Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
*
* @param stylesJson - Required. A JSON-formatted string representing the styles.
*
* @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
*/
importStylesFromJson(stylesJson: string, ): OfficeExtension.ClientResult<string[]>;
importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
/**
* Import styles from a JSON-formatted string.
*
Expand Down
3 changes: 1 addition & 2 deletions generate-docs/tools/version-remover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ if (process.argv[3] === "Mailbox 1.12") {

if (process.argv[3] === "WordApiDesktop 1.1") {
console.log("Address ImportedStylesConflictBehavior reference when removing WordApiDesktop 1.1");
wholeDts = wholeDts.replace(/importedStylesConflictBehavior\?: Word.ImportedStylesConflictBehavior/g, "");
wholeDts = wholeDts.replace(/@param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document./g, "");
wholeDts = wholeDts.replace(/importedStylesConflictBehavior\?: Word.ImportedStylesConflictBehavior/g, "importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior");
}

fsx.writeFileSync(process.argv[4], wholeDts);
Expand Down

0 comments on commit 2f61cf2

Please sign in to comment.