UNPKG
@jsdocs-io/extractor
Version:
latest (2.1.0)
next (1.0.0-14)
2.1.0
2.0.0
1.0.0
1.0.0-14
1.0.0-13
1.0.0-12
1.0.0-11
1.0.0-10
1.0.0-9
1.0.0-8
1.0.0-7
1.0.0-6
1.0.0-5
1.0.0-4
1.0.0-3
1.0.0-2
1.0.0-1
1.0.0-0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.1
Analyze and extract the API from npm packages
jsdocs-io/extractor
@jsdocs-io/extractor
/
src
/
api-extractor
/
get-start-line-number.ts
14 lines
(11 loc)
•
251 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
*
as
tsm
from
'ts-morph'
;
export
function
getStartLineNumber
(
{ declaration, }: { declaration: tsm.Node; }
): number {
if
(tsm.
Node
.
isSourceFile
(declaration)) {
return
1
; }
return
declaration.
getStartLineNumber
(); }