Skip to content

Commit

Permalink
fix: add ignore comments for facade
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Jan 23, 2025
1 parent bfd9ba4 commit de6fd45
Show file tree
Hide file tree
Showing 32 changed files with 232 additions and 143 deletions.
1 change: 1 addition & 0 deletions packages/core/src/facade/f-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import type { FDoc } from './f-doc';
/**
* Base interface for all event parameters
* @interface IEventBase
* @ignore
*/
export interface IEventBase {
/** Flag to cancel the event if supported */
Expand Down
3 changes: 3 additions & 0 deletions packages/docs-ui/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import type { DocumentDataModel, IDocumentData } from '@univerjs/core';
import { FUniver, UniverInstanceType } from '@univerjs/core';
import { FDocument } from './f-document';

/**
* @ignore
*/
export interface IFUniverDocsUIMixin {
/**
* Create a new document and get the API handler of that document.
Expand Down
3 changes: 3 additions & 0 deletions packages/engine-formula/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import { FUniver } from '@univerjs/core';
import { FFormula } from './f-formula';

/**
* @ignore
*/
export interface IFUniverEngineFormulaMixin {
getFormula(): FFormula;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/network/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import { FUniver } from '@univerjs/core';
import { FNetwork } from './f-network';

/** @ignore */
/**
* @ignore
*/
interface IFUniverNetworkMixin {
/**
* Get the network API of Univer, with the help of which you can send HTTP requests.
Expand Down
3 changes: 3 additions & 0 deletions packages/sheets-conditional-formatting/src/facade/f-range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ import {
import { FRange } from '@univerjs/sheets/facade';
import { FConditionalFormattingBuilder } from './conditional-formatting-builder';

/**
* @ignore
*/
export interface IFRangeConditionalFormattingMixin {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import { ColorBuilder } from '@univerjs/core';
import { FWorkbook } from '@univerjs/sheets/facade';

/**
* @ignore
*/
export interface IFWorkbookConditionalFormattingMixin {
/**
* @deprecated use `univerAPI.newColor()` as instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import {
import { FWorksheet } from '@univerjs/sheets/facade';
import { FConditionalFormattingBuilder } from './conditional-formatting-builder';

/**
* @ignore
*/
export interface IFWorksheetConditionalFormattingMixin {

/**
Expand Down
104 changes: 52 additions & 52 deletions packages/sheets-data-validation/src/facade/f-data-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const allowsInvalid = dataValidation.getAllowInvalid();
* ```
*/
Expand All @@ -59,10 +59,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const type = dataValidation.getCriteriaType();
* ```
*/
Expand All @@ -76,10 +76,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const [operator, formula1, formula2] = dataValidation.getCriteriaValues();
* ```
*/
Expand All @@ -93,10 +93,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const helpText = dataValidation.getHelpText();
* ```
*/
Expand All @@ -110,10 +110,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const builder = dataValidation.copy();
* const newRule = builder.setAllowInvalid(true).build();
* ```
Expand All @@ -128,10 +128,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const isApplied = dataValidation.getApplied();
* ```
*/
Expand All @@ -155,10 +155,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const ranges = dataValidation.getRanges();
* ```
*/
Expand All @@ -177,10 +177,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const unitId = dataValidation.getUnitId();
* ```
*/
Expand All @@ -194,10 +194,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const sheetId = dataValidation.getSheetId();
* ```
*/
Expand All @@ -214,10 +214,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* dataValidation.setCriteria(
* DataValidationType.DECIMAL,
* [DataValidationOperator.BETWEEN, '1', '10'],
Expand Down Expand Up @@ -262,10 +262,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* dataValidation.setOptions({
* allowBlank: true,
* showErrorMessage: true,
Expand Down Expand Up @@ -302,10 +302,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const range = FRange.create('Sheet1', 'A1:B10');
* dataValidation.setRanges([range]);
* ```
Expand Down Expand Up @@ -335,10 +335,10 @@ export class FDataValidation {
* @example
* ```typescript
* const dataValidation = univerAPI
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* .getActiveWorkbook()
* .getActiveWorksheet()
* .getActiveRange()
* .getDataValidation();
* const isDeleted = dataValidation.delete();
* ```
*/
Expand Down
32 changes: 16 additions & 16 deletions packages/sheets-data-validation/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ import { FDataValidationBuilder } from './f-data-validation-builder';
/**
* @ignore
*/
export class FUnvierDataValidationMixin extends FUniver {
/**
* @deprecated use `univerAPI.newDataValidation()` as instead.
*/
static override newDataValidation(): FDataValidationBuilder {
return new FDataValidationBuilder();
}

export interface IFUnvierDataValidationMixin {
/**
* Creates a new instance of FDataValidationBuilder
* @returns {FDataValidationBuilder} A new instance of the FDataValidationBuilder class
Expand All @@ -42,7 +35,19 @@ export class FUnvierDataValidationMixin extends FUniver {
* cell.setDataValidation(rule.requireValueInRange(range));
* ```
*/
newDataValidation(): FDataValidationBuilder {
newDataValidation(): FDataValidationBuilder;
}

export class FUnvierDataValidationMixin extends FUniver implements IFUnvierDataValidationMixin {
/**
* @deprecated use `univerAPI.newDataValidation()` as instead.
* @returns {FDataValidationBuilder} A new instance of the FDataValidationBuilder class
*/
static newDataValidation(): FDataValidationBuilder {
return new FDataValidationBuilder();
}

override newDataValidation(): FDataValidationBuilder {
return new FDataValidationBuilder();
}

Expand Down Expand Up @@ -245,11 +250,6 @@ export class FUnvierDataValidationMixin extends FUniver {

FUniver.extend(FUnvierDataValidationMixin);
declare module '@univerjs/core' {
/**
* @ignore
*/
// eslint-disable-next-line ts/no-namespace
namespace FUniver {
function newDataValidation(): FDataValidationBuilder;
}
// eslint-disable-next-line ts/naming-convention
interface FUniver extends IFUnvierDataValidationMixin {}
}
3 changes: 3 additions & 0 deletions packages/sheets-filter/src/facade/f-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import { FEnum } from '@univerjs/core';
import { CustomFilterOperator } from '@univerjs/sheets-filter';

/**
* @ignore
*/
export interface IFSheetsFilterEnumMixin {
/** Please refer to {@link CustomFilterOperator}. */
CustomFilterOperator: typeof CustomFilterOperator;
Expand Down
3 changes: 3 additions & 0 deletions packages/sheets-filter/src/facade/f-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { FEventName, FUniver, ICommandService } from '@univerjs/core';
import { ClearSheetsFilterCriteriaCommand, SetSheetsFilterCriteriaCommand } from '@univerjs/sheets-filter';
import { FSheetEventName } from '@univerjs/sheets/facade';

/**
* @ignore
*/
export interface IFSheetFilterEventMixin {
/**
* This event will be emitted when the filter criteria on a column is changed.
Expand Down
3 changes: 3 additions & 0 deletions packages/sheets-filter/src/facade/f-range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import { FFilter } from './f-filter';

// TODO: add jsdoc comments for the following API

/**
* @ignore
*/
export interface IFRangeFilter {
/**
* Create a filter for the current range. If the worksheet already has a filter, this method would return `null`.
Expand Down
3 changes: 3 additions & 0 deletions packages/sheets-formula/src/facade/f-formula.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';
import { FFormula } from '@univerjs/engine-formula/facade';
import { IRegisterFunctionService, PLUGIN_CONFIG_KEY_BASE, RegisterFunctionService } from '@univerjs/sheets-formula';

/**
* @ignore
*/
export interface IFFormulaSheetsMixin {
/**
* Update the calculation mode of the formula.
Expand Down
6 changes: 6 additions & 0 deletions packages/sheets-formula/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import { debounce, FUniver } from '@univerjs/core';
import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';
import { type IRegisterFunctionParams, IRegisterFunctionService, RegisterFunctionService } from '@univerjs/sheets-formula';

/**
* @ignore
*/
export interface IFUniverSheetsFormulaMixin {
/**
* Register a function to the spreadsheet.
Expand All @@ -29,6 +32,9 @@ export interface IFUniverSheetsFormulaMixin {
registerFunction(config: IRegisterFunctionParams): IDisposable;
}

/**
* @ignore
*/
export class FUniverSheetsFormulaMixin extends FUniver implements IFUniverSheetsFormulaMixin {
/**
* RegisterFunction may be executed multiple times, triggering multiple formula forced refreshes.
Expand Down
Loading

0 comments on commit de6fd45

Please sign in to comment.