diff --git a/types/flowdoc/.eslintrc.json b/types/flowdoc/.eslintrc.json deleted file mode 100644 index 4c387a7c50e573..00000000000000 --- a/types/flowdoc/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "@definitelytyped/no-type-only-packages": "off" - } -} diff --git a/types/flowdoc/.npmignore b/types/flowdoc/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/flowdoc/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/flowdoc/flowdoc-tests.ts b/types/flowdoc/flowdoc-tests.ts deleted file mode 100644 index 09eda92f59772a..00000000000000 --- a/types/flowdoc/flowdoc-tests.ts +++ /dev/null @@ -1,115 +0,0 @@ -const TYPES = { - DOCUMENT: "DOCUMENT", - PAGE: "PAGE", - SCREEN: "SCREEN", - IMAGE: "IMAGE", - RECTANGLE: "RECT", - ELLIPSE: "ELLIPSE", - DIAMOND: "DIAMOND", - HOTSPOT: "HOTSPOT", - LAYER: "LAYER", -} as Flow.Types; - -const flowFile: Flow.File = { - document: { - id: "cjo45613k00002a5p9gj6nr3b", - name: "Basic Document", - type: TYPES.DOCUMENT, - children: [ - { - id: "cjo456d2700002a5p80zudiut", - name: "Page 1", - type: TYPES.PAGE, - backgroundColor: { - r: 0, - g: 0, - b: 0, - a: 1, - }, - children: [ - { - id: "cjo45mq7500002a5p8n8u1bfz", - name: "Sign in", - type: TYPES.SCREEN, - source: { - fileName: "sign-in.png", - dirPath: "./assets", - }, - children: [], - size: { - h: 700, - w: 1152, - }, - position: { - x: 200, - y: 128, - }, - }, - { - id: "cjo45oi8700002a5pmpnxhfny", - name: "Sign up", - type: TYPES.SCREEN, - source: { - fileName: "sign-up.png", - dirPath: "./assets", - }, - children: [], - size: { - h: 700, - w: 1152, - }, - position: { - x: 1452, - y: 128, - }, - }, - ], - }, - ], - }, - settings: { - grid: [40, 40], - }, - schemaVersion: 1, -}; - -flowFile.settings = {}; -flowFile.schemaVersion = 1; - -const document: Flow.Document = flowFile.document; -document.type = TYPES.DOCUMENT; - -const page: Flow.Page = document.children[0]; -page.type = TYPES.PAGE; -page.backgroundColor = { - r: 255, - g: 255, - b: 255, - a: 1, -}; - -const hotspot: Flow.Layer = { - id: "cjo5mezgg00003g5winhxc8o0", - name: "Layer", - type: TYPES.HOTSPOT, - position: { - x: 390, - y: 390, - }, - size: { - h: 42, - w: 370, - }, - connections: [{ - nodeID: "cjo45mq7500002a5p8n8u1bfz", - }], -}; -hotspot.type = TYPES.HOTSPOT; - -const screen = page.children[0] as Flow.Screen; -screen.type = TYPES.SCREEN; -screen.children.push(hotspot); -screen.position = { - x: 0, - y: 0, -}; diff --git a/types/flowdoc/index.d.ts b/types/flowdoc/index.d.ts deleted file mode 100644 index ae31284ad796ec..00000000000000 --- a/types/flowdoc/index.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -declare namespace Flow { - interface File { - document: Document; - settings: Settings; - schemaVersion: SchemaVersion; - } - - interface Document { - id: string; - name: string; - type: Types["DOCUMENT"]; - children: Page[]; - } - - interface Page extends Node { - type: Types["PAGE"]; - children: Array; - backgroundColor: Color; - startNodeID?: string | undefined; - } - - interface Screen extends Graphic { - type: Types["SCREEN"]; - children: Layer[]; - connections?: Connection[] | undefined; - } - - interface Image extends Graphic { - type: Types["IMAGE"]; - connections?: Connection[] | undefined; - } - - interface Rectangle extends Shape { - type: Types["RECTANGLE"]; - } - - interface Ellipse extends Shape { - type: Types["ELLIPSE"]; - } - - interface Diamond extends Shape { - type: Types["DIAMOND"]; - } - - interface Layer extends Node { - type: Types["LAYER"] | Types["HOTSPOT"]; - position: Point; - size: Size; - connections?: Connection[] | undefined; - } - - interface Connection { - nodeID: string; - } - - interface Settings { - grid?: [number, number] | undefined; - } - - interface Color { - r: number; - g: number; - b: number; - a: number; - } - - interface FileAsset { - fileName: string; - dirPath: string; - } - - type URLAsset = string; - - interface Point { - x: number; - y: number; - } - - interface Size { - h: number; - w: number; - } - - interface Types { - DOCUMENT: "DOCUMENT"; - PAGE: "PAGE"; - SCREEN: "SCREEN"; - IMAGE: "IMAGE"; - RECTANGLE: "RECT"; - ELLIPSE: "ELLIPSE"; - DIAMOND: "DIAMOND"; - HOTSPOT: "HOTSPOT"; - LAYER: "LAYER"; - } - - type SchemaVersion = 1; -} - -type NodeType = "DOCUMENT" | "PAGE" | "SCREEN" | "IMAGE" | "RECT" | "ELLIPSE" | "DIAMOND" | "HOTSPOT" | "LAYER"; - -interface Node { - id: string; - name: string; - type: NodeType; -} - -interface Shape extends Node { - position: Flow.Point; - size: Flow.Size; - connections?: Flow.Connection[] | undefined; -} - -interface Graphic extends Node { - position: Flow.Point; - size: Flow.Size; - source: Flow.FileAsset | Flow.URLAsset; -} diff --git a/types/flowdoc/package.json b/types/flowdoc/package.json deleted file mode 100644 index d1b51ee6368a90..00000000000000 --- a/types/flowdoc/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "private": true, - "name": "@types/flowdoc", - "version": "1.1.9999", - "nonNpm": true, - "nonNpmDescription": "flowdoc", - "projects": [ - "https://github.com/overflowapp/Flow" - ], - "devDependencies": { - "@types/flowdoc": "workspace:." - }, - "owners": [ - { - "name": "Stefan Mansson", - "githubUsername": "animify" - } - ] -} diff --git a/types/flowdoc/tsconfig.json b/types/flowdoc/tsconfig.json deleted file mode 100644 index a4d659bc27d9bf..00000000000000 --- a/types/flowdoc/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "flowdoc-tests.ts" - ] -} diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 17f0734c057beb..fd03d834cff1a5 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -24996,7 +24996,7 @@ declare namespace Excel { icon?: string | EntityCompactLayoutIcons; } /** - * Represents a card layout used for the boolean, double, and string basic types. + * Represents a card layout used for the Boolean, double, and string basic types. * * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] @@ -31046,36 +31046,36 @@ declare namespace Excel { */ preview?: CellValue; /** - * Represents the runtime language of this external code service. - * - * @remarks - * [Api set: ExcelApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the runtime language of this external code service. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ language: "Python"; /** - * Represents the full type name of this object. - * - * @remarks - * [Api set: ExcelApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the full type name of this object. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ Python_type: string; /** - * Represents the short type name of this object. - * - * @remarks - * [Api set: ExcelApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the short type name of this object. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ Python_typeName: string; /** - * Represents the output of str() function when used on this object. - * - * @remarks - * [Api set: ExcelApi BETA (PREVIEW ONLY)] - * @beta - */ + * Represents the output of the `str()` function when used on this object. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ Python_str: string; /** * Represents information about the service that provided the data in this `ExternalCodeServiceObjectCellValue`. @@ -41718,6 +41718,26 @@ declare namespace Excel { * @param groupOption Specifies whether to show the details of grouped rows or grouped columns. */ showGroupDetails(groupOption: "ByRows" | "ByColumns"): void; + /** + * Sets the marshaling mode of the Python in Excel formula =PY. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param marshalMode The mode to set. If not specified, switches from `ExcelValue` to `PythonObject` or vice versa. + */ + togglePythonMarshalMode(marshalMode?: Excel.PythonMarshalMode): void; + /** + * Sets the marshaling mode of the Python in Excel formula =PY. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param marshalMode The mode to set. If not specified, switches from `ExcelValue` to `PythonObject` or vice versa. + */ + togglePythonMarshalMode(marshalMode?: "PythonObject" | "ExcelValue"): void; /** * Ungroups columns and rows for an outline. * @@ -51712,6 +51732,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField: boolean; + /** + * Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * @@ -62275,6 +62303,29 @@ declare namespace Excel { */ power = "Power" } + /** + * Specifies what an =PY formula returns, such as an Excel value or a Python object. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum PythonMarshalMode { + /** + * Specifies that the result of an =PY formula should be a reference to an object in the Python service. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + pythonObject = "PythonObject", + /** + * Specifies that the result of an =PY formula should be an Excel value. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + excelValue = "ExcelValue" + } /** * Specifies where in the z-order a shape should be moved relative to other shapes. * @@ -75013,6 +75064,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; + /** + * Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * @@ -81610,6 +81669,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; + /** + * Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * @@ -91237,6 +91304,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. * @@ -91305,6 +91380,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh?: boolean; /** * For EACH ITEM in the collection: Specifies if the PivotTable allows values in the data body to be edited by the user. * @@ -91374,6 +91457,14 @@ declare namespace Excel { * [Api set: ExcelApi 1.12] */ allowMultipleFiltersPerField?: boolean; + /** + * Specifies whether the PivotTable auto refreshes when the source data changes. Corresponds to "Auto Refresh" setting in the UI. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autoRefresh?: boolean; /** * Specifies if the PivotTable allows values in the data body to be edited by the user. * diff --git a/types/rails__activestorage/index.d.ts b/types/rails__activestorage/index.d.ts index b4491309091eed..691dda571fe709 100644 --- a/types/rails__activestorage/index.d.ts +++ b/types/rails__activestorage/index.d.ts @@ -9,7 +9,7 @@ export class DirectUpload { constructor(file: File, url: string, delegate?: DirectUploadDelegate, customHeaders?: Record); - create(callback: (error: Error, blob: Blob) => void): void; + create(callback: (error: Error | null, blob?: Blob) => void): void; } export interface DirectUploadDelegate { diff --git a/types/rails__activestorage/package.json b/types/rails__activestorage/package.json index c44e735f84b97f..537bb064cde344 100644 --- a/types/rails__activestorage/package.json +++ b/types/rails__activestorage/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/rails__activestorage", - "version": "7.1.9999", + "version": "8.0.9999", "projects": [ "https://github.com/rails/rails/tree/master/activestorage/app/javascript", "http://rubyonrails.org/" diff --git a/types/rails__activestorage/rails__activestorage-tests.ts b/types/rails__activestorage/rails__activestorage-tests.ts index 2cbcdf6ff6cd91..0bf0364053d233 100644 --- a/types/rails__activestorage/rails__activestorage-tests.ts +++ b/types/rails__activestorage/rails__activestorage-tests.ts @@ -25,10 +25,16 @@ const d = new ActiveStorage.DirectUpload( customHeaders, ); -d.create((error, blob) => { +d.create((error: Error | null) => { if (error) { console.log(error.message); - } else { + } +}); + +d.create((error: Error | null, blob?: ActiveStorage.Blob) => { + if (error) { + console.log(error.message); + } else if (blob) { const { byte_size, checksum, content_type, filename, signed_id } = blob; console.log({ byte_size, checksum, content_type, filename, signed_id }); }