forked from sheetjs/sheetjs
		
	Extract SheetOption interface
Have WritingOptions and Table2SheetOpts inherit. Fixes TS error setting sheet name when using table_to_book and other table_to functions.
This commit is contained in:
		
							parent
							
								
									0ddeba4fc3
								
							
						
					
					
						commit
						59538ee78f
					
				
							
								
								
									
										18
									
								
								types/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										18
									
								
								types/index.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -205,8 +205,16 @@ export interface ParsingOptions extends CommonOptions { | ||||
|     dense?: boolean; | ||||
| } | ||||
| 
 | ||||
| export interface SheetOption { | ||||
|   /** | ||||
|    * Name of Worksheet (for single-sheet formats) | ||||
|    * @default '' | ||||
|    */ | ||||
|   sheet?: string; | ||||
| } | ||||
| 
 | ||||
| /** Options for write and writeFile */ | ||||
| export interface WritingOptions extends CommonOptions { | ||||
| export interface WritingOptions extends CommonOptions, SheetOption { | ||||
|     /** Output data encoding */ | ||||
|     type?: 'base64' | 'binary' | 'buffer' | 'file' | 'array' | 'string'; | ||||
| 
 | ||||
| @ -222,12 +230,6 @@ export interface WritingOptions extends CommonOptions { | ||||
|      */ | ||||
|     bookType?: BookType; | ||||
| 
 | ||||
|     /** | ||||
|      * Name of Worksheet (for single-sheet formats) | ||||
|      * @default '' | ||||
|      */ | ||||
|     sheet?: string; | ||||
| 
 | ||||
|     /** | ||||
|      * Use ZIP compression for ZIP-based formats | ||||
|      * @default false | ||||
| @ -702,7 +704,7 @@ export interface JSON2SheetOpts extends CommonOptions, DateNFOption { | ||||
| 
 | ||||
| export interface SheetJSONOpts extends JSON2SheetOpts, OriginOption {} | ||||
| 
 | ||||
| export interface Table2SheetOpts extends CommonOptions, DateNFOption, OriginOption { | ||||
| export interface Table2SheetOpts extends CommonOptions, DateNFOption, OriginOption, SheetOption { | ||||
|     /** If true, plaintext parsing will not parse values */ | ||||
|     raw?: boolean; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user