fix(tl-ref): usage count for arrays in return types
This commit is contained in:
parent
e1e4d08ac1
commit
ad511546ca
2 changed files with 3 additions and 2 deletions
|
@ -84,10 +84,11 @@ function prepareData(data) {
|
|||
// add hex constructor id
|
||||
if (item.id) item.tlId = item.id.toString(16).padStart(8, '0')
|
||||
|
||||
// raw non-array type for usages count
|
||||
if (item.arguments) item.arguments.forEach((arg) => {
|
||||
// raw non-array type for usages count
|
||||
arg.rawType = arg.type.replace(/\[]$/, '')
|
||||
})
|
||||
if (item.returns) item.rawReturns = item.returns.replace(/\[]$/, '')
|
||||
|
||||
// add typescript types for the item and arguments
|
||||
// basically copy-pasted from generate-types.js
|
||||
|
|
|
@ -471,7 +471,7 @@ export const query = graphql`
|
|||
filter: {
|
||||
prefix: { eq: $prefix }
|
||||
type: { eq: "method" }
|
||||
returns: { eq: $name }
|
||||
rawReturns: { eq: $name }
|
||||
}
|
||||
) @include(if: $hasSubtypes) {
|
||||
nodes {
|
||||
|
|
Loading…
Reference in a new issue