Skip to content

Commit

Permalink
Add TS declarations of Workbook properties (exceljs#1656)
Browse files Browse the repository at this point in the history
* types(Workbook): add properties to workbook class

* add semicolons
  • Loading branch information
kaoths authored Apr 11, 2021
1 parent 8e9dee9 commit a0b4583
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1682,12 +1682,19 @@ export interface WorkbookModel {
}

export class Workbook {
category: string;
company: string;
creator: string;
description: string;
keywords: string;
lastModifiedBy: string;
created: Date;
manager: string;
modified: Date;
lastPrinted: Date;
properties: WorkbookProperties;
subject: string;
title: string;

/**
* Workbook calculation Properties
Expand Down
7 changes: 7 additions & 0 deletions lib/doc/workbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ const CSV = require('../csv/csv');

class Workbook {
constructor() {
this.category = '';
this.company = '';
this.created = new Date();
this.description = '';
this.keywords = '';
this.manager = '';
this.modified = this.created;
this.properties = {};
this.calcProperties = {};
this._worksheets = [];
this.subject = '';
this.title = '';
this.views = [];
this.media = [];
this._definedNames = new DefinedNames();
Expand Down

0 comments on commit a0b4583

Please sign in to comment.