File tree 4 files changed +8
-0
lines changed
4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,8 @@ function getPluginsConfig(
381
381
const typeLiteral = properytSignature . type as ts . TypeLiteralNode ;
382
382
383
383
const nm = properytSignature . name . getText ( ) ;
384
+ const symbol = typeChecker . getSymbolAtLocation ( properytSignature . name ) ;
385
+ const docs = symbol ? serializeSymbol ( typeChecker , symbol ) : null ;
384
386
const i : DocsConfigInterface = {
385
387
name : nm ,
386
388
slug : slugify ( nm ) ,
@@ -390,6 +392,7 @@ function getPluginsConfig(
390
392
return getInterfaceProperty ( typeChecker , propertySignature ) ;
391
393
} )
392
394
. filter ( p => p != null ) as DocsInterfaceProperty [ ] ,
395
+ docs : docs ?. docs || '' ,
393
396
} ;
394
397
395
398
if ( i . properties . length > 0 ) {
Original file line number Diff line number Diff line change 2
2
3
3
declare module '@capacitor/cli' {
4
4
export interface PluginsConfig {
5
+ /**
6
+ * Haptics can be configured with this options:
7
+ */
5
8
Haptics ?: {
6
9
/**
7
10
* Configure the style.
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ describe('parse', () => {
147
147
const p = pluginConfigs . find ( i => i . name === `Haptics` ) ;
148
148
149
149
expect ( p . slug ) . toBe ( `haptics` ) ;
150
+ expect ( p . docs ) . toBe ( `Haptics can be configured with this options:` ) ;
150
151
expect ( p . properties ) . toHaveLength ( 2 ) ;
151
152
152
153
const p0 = p . properties [ 0 ] ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export interface DocsConfigInterface {
10
10
name : string ;
11
11
slug : string ;
12
12
properties : DocsInterfaceProperty [ ] ;
13
+ docs : string ;
13
14
}
14
15
15
16
export interface DocsInterface {
You can’t perform that action at this time.
0 commit comments