diff --git a/attw.json b/attw.json index f3ef72d6967208..1be8d0ce8b9757 100644 --- a/attw.json +++ b/attw.json @@ -159,7 +159,6 @@ "hellosign-sdk", "html-minifier-terser", "html-to-text", - "i18next-fs-backend", "i18next-sprintf-postprocessor", "ibm_db", "identicon.js", diff --git a/notNeededPackages.json b/notNeededPackages.json index bed4dc853d92b5..3e045bda246865 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2525,6 +2525,10 @@ "libraryName": "i18next-express-middleware", "asOfVersion": "1.7.0" }, + "i18next-fs-backend": { + "libraryName": "i18next-fs-backend", + "asOfVersion": "1.2.0" + }, "i18next-xhr-backend": { "libraryName": "i18next-xhr-backend", "asOfVersion": "1.4.2" diff --git a/types/consumer-data-standards/README.md b/types/consumer-data-standards/README.md index 152bf8d001a6aa..ec11b56629769a 100644 --- a/types/consumer-data-standards/README.md +++ b/types/consumer-data-standards/README.md @@ -6,7 +6,7 @@ This fork of the [DefinitelyTyped](https://github.com/DefinitelyTyped/Definitely ## Using the Type Definitions -The Data Standards Body publishes the Type Definitions as a [npm package](https://www.npmjs.com/package/@types/consumer-data-standards). To use these type definitions in your TypeScript projects, you can install them via npm as part of your development dependencies. Please refer to the [Quick Start Guide](#quick-start-guide) section below for more information. +The Data Standards Body publishes the Type Definitions as a [npm package](https://www.npmjs.com/package/@types/consumer-data-standards). To use these type definitions in your TypeScript projects, you can install them via npm as part of your development dependencies. Please refer to the [Quick Start Guide](#quick-start-guide) section below for more information. This tool: @@ -18,29 +18,28 @@ This tool: Please follow these steps to integrate the CDR-specific type definitions into your TypeScript projects: 1. **Install** via npm or Yarn: Depending on your preference, you can use npm or Yarn to install the CDS type definitions package published to npm. - - ```bash - npm install @types/consumer-data-standards - ``` - - Or - - ```bash - yarn install @types/consumer-data-standards - ``` - + + ```bash + npm install @types/consumer-data-standards + ``` + + Or + + ```bash + yarn install @types/consumer-data-standards + ``` + 2. **Usage**: Utilise the types in your TypeScript code as needed: - - ```tsx - import { YourType } from 'your-package'; - - function processData(data: YourType) { - // your code here - } - ``` - -3. **Stay Updated**: Regularly check for updates to ensure you have the latest type definitions. + ```tsx + import { YourType } from "your-package"; + + function processData(data: YourType) { + // your code here + } + ``` + +3. **Stay Updated**: Regularly check for updates to ensure you have the latest type definitions. ## Reporting Issues diff --git a/types/consumer-data-standards/banking/index.d.ts b/types/consumer-data-standards/banking/index.d.ts index 1230c3c5cadbe6..7a039d328dcc91 100644 --- a/types/consumer-data-standards/banking/index.d.ts +++ b/types/consumer-data-standards/banking/index.d.ts @@ -877,6 +877,34 @@ export interface BankingProductConstraint { } /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ +/* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ + +export interface BankingProductConstraintV2 { + /** + * Display text providing more information on the constraint. + */ + additionalInfo?: string | null; + /** + * Link to a web page with more information on the constraint. + */ + additionalInfoUri?: string | null; + /** + * Generic field containing additional information relevant to the [_constraintType_](#tocSproductconstrainttypedoc) specified. Whether mandatory or not is dependent on the value of [_constraintType_](#tocSproductconstrainttypedoc). + */ + additionalValue?: string | null; + /** + * The type of constraint described. For further details, refer to [Product Constraint Types](#tocSproductconstrainttypedoc). + */ + constraintType: + | "MAX_BALANCE" + | "MAX_LIMIT" + | "MAX_LVR" + | "MIN_BALANCE" + | "MIN_LIMIT" + | "MIN_LVR" + | "OPENING_BALANCE"; + [k: string]: unknown; +} export interface BankingProductDepositRate { /** * Display text providing more information on the rate. @@ -1443,6 +1471,40 @@ export interface BankingProductDetailV4 extends BankingProductV4 { }>; [k: string]: unknown; } + +/* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ + +export type BankingProductDetailV5 = BankingProductV4 & { + /** + * An array of bundles that this product participates in. Each bundle is described by free form information but also by a list of product IDs of the other products that are included in the bundle. It is assumed that the current product is included in the bundle also. + */ + bundles?: BankingProductBundle[] | null; + /** + * Array of features available for the product. + */ + features?: BankingProductFeatureV2[] | null; + /** + * Constraints on the application for or operation of the product such as minimum balances or limit thresholds. + */ + constraints?: BankingProductConstraintV2[] | null; + /** + * Eligibility criteria for the product. + */ + eligibility?: BankingProductEligibility[] | null; + /** + * Fees applicable for the product. + */ + fees?: BankingProductFee[] | null; + /** + * Interest rates available for deposits. + */ + depositRates?: BankingProductDepositRate[] | null; + /** + * Interest rates charged against lending balances. + */ + lendingRates?: BankingProductLendingRateV2[] | null; + [k: string]: unknown; +}; /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ export interface BankingProductDiscount { @@ -2876,6 +2938,50 @@ export interface BankingTransactionDetail extends BankingTransaction { } /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ +export type BankingTransactionDetailV2 = BankingTransaction & { + extendedData: { + /** + * Label of the originating payer. Mandatory for inbound payment. + */ + payer?: string; + /** + * Label of the target PayID. Mandatory for an outbound payment. The name assigned to the BSB/Account Number or PayID (by the owner of the PayID). + */ + payee?: string; + /** + * Optional extended data specific to transactions. Currently extended data is supported for NPP service overlays. + */ + extensionUType?: "nppPayload"; + /** + * Required if the _extensionUType_ value is `nppPayload`. + */ + nppPayload?: { + /** + * An extended string description. Required if the _extensionUType_ value is `nppPayload`. + */ + extendedDescription?: string; + /** + * An end to end ID for the payment created at initiation. + */ + endToEndId?: string; + /** + * Purpose of the payment. Format is defined by the NPP standards for the NPP overlay services including Osko (X2P1). + */ + purposeCode?: string; + /** + * Identifier of the applicable overlay service. The _service_ is used in conjunction with the _serviceVersion_. See [here](#npp-services) for more details. + */ + service: "X2P1" | "IFTI" | "BSCT" | "CATSCT"; + /** + * Two-digit NPP service overlay version with leading zero. + */ + serviceVersion: string; + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; +}; /** * Australian address formatted according to the file format defined by the [PAF file format](https://auspost.com.au/content/dam/auspost_corp/media/documents/australia-post-data-guide.pdf). */ @@ -3226,9 +3332,17 @@ export interface MetaPaginatedTransaction { */ isQueryParamUnsupported?: boolean | null; } + +/** + * Identifier of the applicable overlay service. The _service_ is used in conjunction with the _serviceVersion_. See [here](#npp-services) for more details. + */ +export type NppPaymentService = "X2P1" | "IFTI" | "BSCT" | "CATSCT"; /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ export interface RequestAccountIds { data: { + /** + * Array of _accountId_ values. + */ accountIds: string[]; [k: string]: unknown; }; @@ -5412,6 +5526,45 @@ export interface ResponseBankingProductByIdV4 { } /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ +/* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ + +export interface ResponseBankingProductByIdV5 { + data: BankingProductV4 & { + /** + * An array of bundles that this product participates in. Each bundle is described by free form information but also by a list of product IDs of the other products that are included in the bundle. It is assumed that the current product is included in the bundle also. + */ + bundles?: BankingProductBundle[] | null; + /** + * Array of features available for the product. + */ + features?: BankingProductFeatureV2[] | null; + /** + * Constraints on the application for or operation of the product such as minimum balances or limit thresholds. + */ + constraints?: BankingProductConstraintV2[] | null; + /** + * Eligibility criteria for the product. + */ + eligibility?: BankingProductEligibility[] | null; + /** + * Fees applicable for the product. + */ + fees?: BankingProductFee[] | null; + /** + * Interest rates available for deposits. + */ + depositRates?: BankingProductDepositRate[] | null; + /** + * Interest rates charged against lending balances. + */ + lendingRates?: BankingProductLendingRateV2[] | null; + [k: string]: unknown; + }; + links: Links; + meta?: null | Meta; + [k: string]: unknown; +} + export interface ResponseBankingProductListV2 { data: { /** @@ -6460,6 +6613,58 @@ export interface ResponseBankingTransactionById { } /* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ +/* These are the schema definitions stipulated by the Data Standards Body for the banking api. */ + +export interface ResponseBankingTransactionByIdV2 { + data: BankingTransaction & { + extendedData: { + /** + * Label of the originating payer. Mandatory for inbound payment. + */ + payer?: string; + /** + * Label of the target PayID. Mandatory for an outbound payment. The name assigned to the BSB/Account Number or PayID (by the owner of the PayID). + */ + payee?: string; + /** + * Optional extended data specific to transactions. Currently extended data is supported for NPP service overlays. + */ + extensionUType?: "nppPayload"; + /** + * Required if the _extensionUType_ value is `nppPayload`. + */ + nppPayload?: { + /** + * An extended string description. Required if the _extensionUType_ value is `nppPayload`. + */ + extendedDescription?: string; + /** + * An end to end ID for the payment created at initiation. + */ + endToEndId?: string; + /** + * Purpose of the payment. Format is defined by the NPP standards for the NPP overlay services including Osko (X2P1). + */ + purposeCode?: string; + /** + * Identifier of the applicable overlay service. The _service_ is used in conjunction with the _serviceVersion_. See [here](#npp-services) for more details. + */ + service: "X2P1" | "IFTI" | "BSCT" | "CATSCT"; + /** + * Two-digit NPP service overlay version with leading zero. + */ + serviceVersion: string; + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; + }; + links: Links; + meta?: Meta; + [k: string]: unknown; +} + export interface ResponseBankingTransactionList { data: { transactions: Array<{ @@ -6579,11 +6784,11 @@ export interface ResponseBankingTransactionList { * The total number of records in the full set. See [pagination](#pagination). */ totalRecords: number; - [k: string]: unknown; /** * true if "text" query parameter is not supported */ isQueryParamUnsupported?: boolean | null; + [k: string]: unknown; }; [k: string]: unknown; } diff --git a/types/consumer-data-standards/common/index.d.ts b/types/consumer-data-standards/common/index.d.ts index 463faced9fb279..9aaf58e32db323 100644 --- a/types/consumer-data-standards/common/index.d.ts +++ b/types/consumer-data-standards/common/index.d.ts @@ -173,7 +173,7 @@ export interface CommonOrganisationDetailV2 extends CommonOrganisation { */ thoroughfareNumber1?: number | null; /** - * Suffix for the thoroughfare number. Only relevant is thoroughfareNumber1 is populated + * Suffix for the thoroughfare number. Only relevant if _thoroughfareNumber1_ is populated */ thoroughfareNumber1Suffix?: string | null; /** @@ -181,7 +181,7 @@ export interface CommonOrganisationDetailV2 extends CommonOrganisation { */ thoroughfareNumber2?: number | null; /** - * Suffix for the second thoroughfare number. Only relevant is thoroughfareNumber2 is populated + * Suffix for the second thoroughfare number. Only relevant if _thoroughfareNumber2_ is populated */ thoroughfareNumber2Suffix?: string | null; [k: string]: unknown; diff --git a/types/consumer-data-standards/energy/index.d.ts b/types/consumer-data-standards/energy/index.d.ts index 0d620b2416d50c..93179286ef6533 100644 --- a/types/consumer-data-standards/energy/index.d.ts +++ b/types/consumer-data-standards/energy/index.d.ts @@ -5125,7 +5125,7 @@ export interface EnergyPlanSolarFeedInTariffV3 { */ startDate?: string; /** - * The type of the payer + * Reference to the applicable tariff structure */ tariffUType: "singleTariff" | "timeVaryingTariffs"; /** @@ -5398,7 +5398,7 @@ export interface EnergyPlanTariffPeriodV2 { */ dailySupplyCharge?: string; /** - * Specifies if daily supply charge is single or banded. Default value is SINGLE if field not provided + * Specifies if daily supply charge is single or banded. */ dailySupplyChargeType?: "SINGLE" | "BAND"; /** @@ -5769,7 +5769,7 @@ export interface EnergyServicePointDetail { */ thoroughfareNumber1?: number | null; /** - * Suffix for the thoroughfare number. Only relevant is thoroughfareNumber1 is populated + * Suffix for the thoroughfare number. Only relevant if _thoroughfareNumber1_ is populated */ thoroughfareNumber1Suffix?: string | null; /** @@ -5777,7 +5777,7 @@ export interface EnergyServicePointDetail { */ thoroughfareNumber2?: number | null; /** - * Suffix for the second thoroughfare number. Only relevant is thoroughfareNumber2 is populated + * Suffix for the second thoroughfare number. Only relevant if _thoroughfareNumber2_ is populated */ thoroughfareNumber2Suffix?: string | null; [k: string]: unknown; diff --git a/types/consumer-data-standards/package.json b/types/consumer-data-standards/package.json index 02953eb8bfc1f0..f7f15c57545cc3 100644 --- a/types/consumer-data-standards/package.json +++ b/types/consumer-data-standards/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/consumer-data-standards", - "version": "7.2.9999", + "version": "7.3.9999", "nonNpm": true, "nonNpmDescription": "consumer-data-standards-browser", "projects": [ diff --git a/types/consumer-data-standards/register/index.d.ts b/types/consumer-data-standards/register/index.d.ts index 555f8695321053..70c83c996608cb 100644 --- a/types/consumer-data-standards/register/index.d.ts +++ b/types/consumer-data-standards/register/index.d.ts @@ -758,7 +758,7 @@ export interface ResponseOpenIDProviderConfigMetadata { */ jwks_uri: string; /** - * JSON array containing a list of the OAuth 2.0 response_type values that the CDR Registrer supports + * JSON array containing a list of the OAuth 2.0 response_type values that the CDR Register supports */ response_types_supported: string[]; /** diff --git a/types/es-abstract/package.json b/types/es-abstract/package.json index 6b12d9ca6ab59e..8c63378add6ba9 100644 --- a/types/es-abstract/package.json +++ b/types/es-abstract/package.json @@ -6,7 +6,7 @@ "https://github.com/ljharb/es-abstract" ], "dependencies": { - "@types/es-to-primitive": "*" + "es-to-primitive": "^1.3.0" }, "devDependencies": { "@types/es-abstract": "workspace:." diff --git a/types/es-abstract/test/es2015.test.ts b/types/es-abstract/test/es2015.test.ts index dd3b5153b60885..0d98651289ddfe 100644 --- a/types/es-abstract/test/es2015.test.ts +++ b/types/es-abstract/test/es2015.test.ts @@ -35,7 +35,7 @@ expectType< | undefined >(ES2015.Type(any)); -ES2015.ToPrimitive(any); // $ExpectType string | number | bigint | boolean | symbol | null | undefined +ES2015.ToPrimitive(any); // $ExpectType primitive ES2015.ToInt16(any); // $ExpectType number ES2015.ToInt8(any); // $ExpectType number ES2015.ToUint8(any); // $ExpectType number diff --git a/types/google-apps-script/apis/directory_v1.d.ts b/types/google-apps-script/apis/directory_v1.d.ts index 8e57a7f0bb411b..b851c36e1e26c1 100644 --- a/types/google-apps-script/apis/directory_v1.d.ts +++ b/types/google-apps-script/apis/directory_v1.d.ts @@ -953,6 +953,8 @@ declare namespace GoogleAppsScript { phones?: object[] | undefined; posixAccounts?: object[] | undefined; primaryEmail?: string | undefined; + recoveryEmail?: string | undefined; + recoveryPhone?: string | undefined; relations?: object[] | undefined; sshPublicKeys?: object[] | undefined; suspended?: boolean | undefined; diff --git a/types/i18next-fs-backend/.npmignore b/types/i18next-fs-backend/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/i18next-fs-backend/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/i18next-fs-backend/i18next-fs-backend-tests.ts b/types/i18next-fs-backend/i18next-fs-backend-tests.ts deleted file mode 100644 index 39b870555f52e0..00000000000000 --- a/types/i18next-fs-backend/i18next-fs-backend-tests.ts +++ /dev/null @@ -1,52 +0,0 @@ -import i18next from "i18next"; -import Backend, { i18nextFsBackend } from "i18next-fs-backend"; - -// #region Plain options - -const plainOptions: { backend: i18nextFsBackend.i18nextFsBackendOptions; skipOnVariables: boolean } = { - backend: { - loadPath: "/locales/{{lng}}/{{ns}}.json", - addPath: "/locales/{{lng}}/{{ns}}.missing.json", - ident: 2, - parse: JSON.parse, - stringify: JSON.stringify, - }, - skipOnVariables: false, -}; - -i18next.use(Backend).init(plainOptions); -i18next.use(Backend).init({ backend: plainOptions.backend }); - -// #endregion -// #region Custom loadPath resolver - -const loadPathOptions: { backend: i18nextFsBackend.i18nextFsBackendOptions } = { - backend: { - loadPath: (lng: string, ns: string) => `/locales/${lng}/${ns}.json`, - addPath: "/locales/{{lng}}/{{ns}}.missing.json", - ident: 2, - parse: JSON.parse, - stringify: JSON.stringify, - }, -}; - -i18next.use(Backend).init(loadPathOptions); -i18next.use(Backend).init({ backend: loadPathOptions.backend }); - -// #endregion -// #region Custom parse & stringify - -const parseStringifyOptions: { backend: i18nextFsBackend.i18nextFsBackendOptions } = { - backend: { - loadPath: (lng: string, ns: string) => `/locales/${lng}/${ns}.json`, - addPath: "/locales/{{lng}}/{{ns}}.missing.json", - ident: 2, - parse: (data: string) => JSON.parse(data), - stringify: (data: unknown) => JSON.stringify(data), - }, -}; - -i18next.use(Backend).init(parseStringifyOptions); -i18next.use(Backend).init({ backend: parseStringifyOptions.backend }); - -// #endregion diff --git a/types/i18next-fs-backend/index.d.ts b/types/i18next-fs-backend/index.d.ts deleted file mode 100644 index 0f89c6a3549701..00000000000000 --- a/types/i18next-fs-backend/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { BackendModule, InitOptions, ReadCallback, Services } from "i18next"; - -export namespace i18next { - interface InitOptions { - backend?: i18nextFsBackend.i18nextFsBackendOptions | undefined; - } -} - -export namespace i18nextFsBackend { - type loadPathFunction = (language: string, namespace: string) => string; - - interface i18nextFsBackendOptions { - loadPath?: string | loadPathFunction | undefined; - addPath?: string | undefined; - ident?: number | undefined; - parse?: ((data: string) => unknown) | undefined; - stringify?: ((data: unknown) => string) | undefined; - } -} - -export default class Backend implements BackendModule { - type: "backend"; - constructor( - services: Services, - backendOptions: i18nextFsBackend.i18nextFsBackendOptions, - i18nextOptions: InitOptions, - ); - init( - services: Services, - backendOptions: i18nextFsBackend.i18nextFsBackendOptions, - i18nextOptions: InitOptions, - ): void; - read(language: string, namespace: string, callback: ReadCallback): void; - create(languages: string[], namespace: string, key: string, fallbackValue: string): void; - - write(): void; - writeFile(lng: string, namespace: string): void; - queue(lng: string, namespace: string, key: string, fallbackValue: string, callback: unknown): void; - - static type: "backend"; -} diff --git a/types/i18next-fs-backend/package.json b/types/i18next-fs-backend/package.json deleted file mode 100644 index 0d486d412d72ee..00000000000000 --- a/types/i18next-fs-backend/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "private": true, - "name": "@types/i18next-fs-backend", - "version": "1.1.9999", - "projects": [ - "https://github.com/i18next/i18next-fs-backend" - ], - "dependencies": { - "i18next": "^21.0.1" - }, - "devDependencies": { - "@types/i18next-fs-backend": "workspace:." - }, - "owners": [ - { - "name": "Nejc Drobnič", - "githubUsername": "quantumlyy" - }, - { - "name": "Jeroen \"Favna\" Claassens", - "githubUsername": "favna" - } - ] -} diff --git a/types/i18next-fs-backend/tsconfig.json b/types/i18next-fs-backend/tsconfig.json deleted file mode 100644 index 28bcb577991130..00000000000000 --- a/types/i18next-fs-backend/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "i18next-fs-backend-tests.ts" - ] -} diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 90d9950b721234..fd0a344531ba6c 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -104143,6 +104143,14 @@ declare namespace Word { * @beta */ readonly body: Word.Body; + /** + * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly parentGroup: Word.Shape; /** * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * @@ -104175,6 +104183,14 @@ declare namespace Word { * @beta */ readonly id: number; + /** + * Check whether this shape is a child of a group shape or a canvas shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + readonly isChild: boolean; /** * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. * @@ -104361,7 +104377,7 @@ declare namespace Word { * [Api set: WordApi BETA (PREVIEW ONLY)] * @beta */ - unGroup(): Word.ShapeCollection; + ungroup(): Word.ShapeCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * @@ -104449,6 +104465,16 @@ declare namespace Word { * @param ids Required. An array of shape identifiers. */ getByIds(ids: number[]): Word.ShapeCollection; + /** + * Gets the shapes that have the specified names. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + * + * @param names Required. An array of shape names. + */ + getByNames(names: string[]): Word.ShapeCollection; /** * Gets the shapes that have the specified types. * @@ -111447,13 +111473,21 @@ declare namespace Word { /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ interface ShapeUpdateData { /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the body object of the shape. Only applies to text boxes and geometric shapes. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Word.Interfaces.ShapeUpdateData; /** * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * @@ -113799,6 +113833,14 @@ declare namespace Word { * @beta */ body?: Word.Interfaces.BodyData; + /** + * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Word.Interfaces.ShapeData; /** * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * @@ -113831,6 +113873,14 @@ declare namespace Word { * @beta */ id?: number; + /** + * Check whether this shape is a child of a group shape or a canvas shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + isChild?: boolean; /** * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. * @@ -118311,13 +118361,21 @@ declare namespace Word { */ $all?: boolean; /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the body object of the shape. Only applies to text boxes and geometric shapes. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Word.Interfaces.ShapeLoadOptions; /** * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * @@ -118350,6 +118408,14 @@ declare namespace Word { * @beta */ id?: boolean; + /** + * Check whether this shape is a child of a group shape or a canvas shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + isChild?: boolean; /** * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. * @@ -118449,13 +118515,21 @@ declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta - */ + * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + parentGroup?: Word.Interfaces.ShapeLoadOptions; /** * For EACH ITEM in the collection: Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * @@ -118488,6 +118562,14 @@ declare namespace Word { * @beta */ id?: boolean; + /** + * For EACH ITEM in the collection: Check whether this shape is a child of a group shape or a canvas shape. + * + * @remarks + * [Api set: WordApi BETA (PREVIEW ONLY)] + * @beta + */ + isChild?: boolean; /** * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. * @@ -130979,47 +131061,47 @@ declare namespace PowerPoint { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold: boolean; + bold: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color: string; + color: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic: boolean; + italic: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name: string; + name: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size: number; + size: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble" | null; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * @@ -133492,47 +133574,47 @@ declare namespace PowerPoint { /** An interface for updating data on the `ShapeFont` object, for use in `shapeFont.set({ ... })`. */ interface ShapeFontUpdateData { /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold?: boolean; + bold?: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color?: string; + color?: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic?: boolean; + italic?: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name?: string; + name?: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size?: number; + size?: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline?: ShapeFontUnderlineStyle | null; } /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ interface ShapeCollectionUpdateData { @@ -133918,47 +134000,47 @@ declare namespace PowerPoint { /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ interface ShapeFontData { /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold?: boolean; + bold?: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color?: string; + color?: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic?: boolean; + italic?: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name?: string; + name?: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size?: number; + size?: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline?: ShapeFontUnderlineStyle | null; } /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ interface ShapeCollectionData { @@ -134603,42 +134685,42 @@ declare namespace PowerPoint { */ $all?: boolean; /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold?: boolean; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color?: boolean; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic?: boolean; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size?: boolean; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 843c7bda66b0c0..5613fca59795ea 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -119548,47 +119548,47 @@ declare namespace PowerPoint { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold: boolean; + bold: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color: string; + color: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic: boolean; + italic: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name: string; + name: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size: number; + size: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble" | null; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * @@ -121589,47 +121589,47 @@ declare namespace PowerPoint { /** An interface for updating data on the `ShapeFont` object, for use in `shapeFont.set({ ... })`. */ interface ShapeFontUpdateData { /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold?: boolean; + bold?: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color?: string; + color?: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic?: boolean; + italic?: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name?: string; + name?: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size?: number; + size?: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline?: ShapeFontUnderlineStyle | null; } /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ interface ShapeCollectionUpdateData { @@ -122015,47 +122015,47 @@ declare namespace PowerPoint { /** An interface describing the data returned by calling `shapeFont.toJSON()`. */ interface ShapeFontData { /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - bold?: boolean; + bold?: boolean | null; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ - color?: string; + color?: string | null; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ - italic?: boolean; + italic?: boolean | null; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ - name?: string; + name?: string | null; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ - size?: number; + size?: number | null; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] */ - underline?: PowerPoint.ShapeFontUnderlineStyle | "None" | "Single" | "Double" | "Heavy" | "Dotted" | "DottedHeavy" | "Dash" | "DashHeavy" | "DashLong" | "DashLongHeavy" | "DotDash" | "DotDashHeavy" | "DotDotDash" | "DotDotDashHeavy" | "Wavy" | "WavyHeavy" | "WavyDouble"; + underline?: ShapeFontUnderlineStyle | null; } /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ interface ShapeCollectionData { @@ -122659,42 +122659,42 @@ declare namespace PowerPoint { */ $all?: boolean; /** - * Represents the bold status of font. Returns `null` if the `TextRange` includes both bold and non-bold text fragments. + * Specifies the bold status of font. Returns `null` if the `TextRange` contains both bold and non-bold text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ bold?: boolean; /** - * HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` includes text fragments with different colors. + * Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors. * * @remarks * [Api set: PowerPointApi 1.4] */ color?: boolean; /** - * Represents the italic status of font. Returns 'null' if the 'TextRange' includes both italic and non-italic text fragments. + * Specifies the italic status of font. Returns 'null' if the 'TextRange' contains both italic and non-italic text fragments. * * @remarks * [Api set: PowerPointApi 1.4] */ italic?: boolean; /** - * Represents font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. + * Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it is the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names. * * @remarks * [Api set: PowerPointApi 1.4] */ name?: boolean; /** - * Represents font size in points (e.g., 11). Returns null if the TextRange includes text fragments with different font sizes. + * Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes. * * @remarks * [Api set: PowerPointApi 1.4] */ size?: boolean; /** - * Type of underline applied to the font. Returns `null` if the `TextRange` includes text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. + * Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details. * * @remarks * [Api set: PowerPointApi 1.4] diff --git a/types/pdfkit/index.d.ts b/types/pdfkit/index.d.ts index 9f42b39e2cc3d4..b96f608f4402bc 100644 --- a/types/pdfkit/index.d.ts +++ b/types/pdfkit/index.d.ts @@ -413,6 +413,8 @@ declare namespace PDFKit.Mixins { columnGap?: number | undefined; /** The amount in PDF points (72 per inch) to indent each paragraph of text */ indent?: number | undefined; + /** Whether to indent all lines of a paragraph */ + indentAllLines?: boolean | undefined; /** The amount of space between each paragraph of text */ paragraphGap?: number | undefined; /** The amount of space between each line of text */ diff --git a/types/pdfkit/pdfkit-tests.ts b/types/pdfkit/pdfkit-tests.ts index 9f7b3c6eca22d4..1661710d5ab538 100644 --- a/types/pdfkit/pdfkit-tests.ts +++ b/types/pdfkit/pdfkit-tests.ts @@ -227,6 +227,9 @@ doc.text("Text with null link", { align: "left" }); doc.text("Text with null link", { align: "center" }); doc.text("Text with null link", { align: "right" }); doc.text("Text with null link", { align: "justify" }); + +doc.text("Text with all lines indented", { indentAllLines: true }); + // @ts-expect-error doc.text("Text with null link", { align: "other" }); // Altought this is not an error in JS side, the inclusion of `string` did break type hints