Skip to content

Commit

Permalink
Docs: Make menu labels consistent with the page titles in the API ref (
Browse files Browse the repository at this point in the history
…#1399)

* Rename API reference menu items in the docs

* Rename docs/api-template.md to docs/api-ref-readme.md

* Extract ConfigParams interface to separate file

* Fix jsdoc formatting
  • Loading branch information
sequba authored Apr 3, 2024
1 parent 48bceb0 commit a752b76
Show file tree
Hide file tree
Showing 11 changed files with 422 additions and 477 deletions.
4 changes: 2 additions & 2 deletions .typedoc.md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = {
...require('./.typedoc.ts'),
"theme": "./docs/.vuepress/subtheme",
"out": "docs/api",
"name": "HyperFormula API reference",
"name": "API Reference Overview",
"categorizeByGroup": true,
"readme": "./docs/api-template.md",
"readme": "./docs/api-ref-readme.md",
"plugin": ["typedoc-plugin-markdown"],
}
4 changes: 2 additions & 2 deletions .typedoc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
"inputFiles": [
"./src/HyperFormula.ts",
"./src/Config.ts",
"./src/ConfigParams.ts",
"./src/Emitter.ts",
],
"exclude": [
Expand Down Expand Up @@ -47,7 +47,7 @@ module.exports = {
],
"toc": [
"HyperFormula",
"Config",
"ConfigParams",
"Emitter"
]
}
8 changes: 4 additions & 4 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,21 @@ module.exports = {
sidebar: {
'/api/': [
{
title: 'Introduction',
title: 'API Reference Overview',
path: '/api/',
},
{
title: 'HyperFormula Class',
title: 'HyperFormula',
path: '/api/classes/hyperformula',
collapsable: true,
},
{
title: 'Configuration Options',
title: 'ConfigParams ',
path: '/api/interfaces/configparams',
collapsable: true,
},
{
title: 'Event Types',
title: 'Listeners',
path: '/api/interfaces/listeners',
alias: '/api/events',
collapsable: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ docs # All documentation files
│   └── highlight.js # Code highlight configuration
├── api # The API reference files, generated automatically from JsDoc. Do not edit!
├── guide # The docs source files: Markdown content
├── api-template.md # The API reference welcome page
├── api-ref-readme.md # The API reference welcome page
├── index.md # The main docs portal welcome page
└── README.md # The file you're looking at right now!
```
4 changes: 2 additions & 2 deletions docs/api-template.md → docs/api-ref-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const sheetData = [
const hfInstance = HyperFormula.buildFromArray(sheetData, options);
```

#### Configuration Options
#### ConfigParams
This section contains information about options that allow you to configure the instance of HyperFormula.

An example set of options:
Expand All @@ -34,7 +34,7 @@ const options = {
};
```

#### Event Types
#### Listeners
In this section, you can find information about all events you can subscribe to.

For example, subscribing to `sheetAdded` event:
Expand Down
3 changes: 2 additions & 1 deletion src/ArgumentSanitization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
* Copyright (c) 2024 Handsoncode. All rights reserved.
*/

import {Config, ConfigParamsList} from './Config'
import {Config} from './Config'
import {
ConfigValueTooBigError,
ConfigValueTooSmallError,
ExpectedOneOfValuesError,
ExpectedValueOfTypeError
} from './errors'
import {ConfigParamsList} from './ConfigParams'

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function configValueFromParam(inputValue: any, expectedType: string | string[], paramName: ConfigParamsList) {
Expand Down
3 changes: 2 additions & 1 deletion src/BuildEngineFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {ArraySizePredictor} from './ArraySize'
import {CellContentParser} from './CellContentParser'
import {ClipboardOperations} from './ClipboardOperations'
import {Config, ConfigParams} from './Config'
import {Config} from './Config'
import {CrudOperations} from './CrudOperations'
import {DateTimeHelper} from './DateTimeHelper'
import {DependencyGraph} from './DependencyGraph'
Expand All @@ -28,6 +28,7 @@ import {Serialization, SerializedNamedExpression} from './Serialization'
import {findBoundaries, Sheet, Sheets, validateAsSheet} from './Sheet'
import {EmptyStatistics, Statistics, StatType} from './statistics'
import {UndoRedo} from './UndoRedo'
import {ConfigParams} from './ConfigParams'

export type EngineState = {
config: Config,
Expand Down
Loading

0 comments on commit a752b76

Please sign in to comment.