# Class: SrcDetector

@boll/rules-typescriptGlobalsSrcDetector

# Class: SrcDetector

SrcDetector will detect usages of src in import statements of typescript source files.

src as a portion of a path indicates that source files from upstream dependencies are being compiled in a project rather than being consumed from compiled sources.

# Hierarchy

  • SrcDetector

# Implements

  • PackageRule

# Index

# Accessors

# Methods

# Accessors

# name

get name(): string

Defined in src-detector.ts:25

Returns: string

# Methods

# check

check(fileContext: FileContext): Promise‹Result[]›

Defined in src-detector.ts:29

Parameters:

Name Type
fileContext FileContext

Returns: Promise‹Result[]›


# checkImportPaths

checkImportPaths(fileName: BollFile, importPaths: ImportPathAndLineNumber[]): Result[]

Defined in src-detector.ts:33

Parameters:

Name Type
fileName BollFile
importPaths ImportPathAndLineNumber[]

Returns: Result[]


# getImportPaths

getImportPaths(sourceFile: SourceFile): ImportPathAndLineNumber[]

Defined in src-detector.ts:51

Parameters:

Name Type
sourceFile SourceFile

Returns: ImportPathAndLineNumber[]