type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
private serialize(
input: CreateCustomRoutingEndpointGroupCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return serializeAws_json1_1CreateCustomRoutingEndpointGroupCommand(input, context);
} | PaulThompson/aws-sdk-js-v3 | clients/client-global-accelerator/commands/CreateCustomRoutingEndpointGroupCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<CreateCustomRoutingEndpointGroupCommandOutput> {
return deserializeAws_json1_1CreateCustomRoutingEndpointGroupCommand(output, context);
} | PaulThompson/aws-sdk-js-v3 | clients/client-global-accelerator/commands/CreateCustomRoutingEndpointGroupCommand.ts | TypeScript |
ArrowFunction |
() => {
let component: UserDetailComponent;
let fixture: ComponentFixture<UserDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [UserDetailComponent],
imports: [RouterTestingModule],
providers: [{ provide: PersonService, useClass: MockPersonService }... | DanielHabenicht/phonebook | Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
declarations: [UserDetailComponent],
imports: [RouterTestingModule],
providers: [{ provide: PersonService, useClass: MockPersonService }]
}).compileComponents();
} | DanielHabenicht/phonebook | Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(UserDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | DanielHabenicht/phonebook | Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.spec.ts | TypeScript |
ClassDeclaration |
class MockPersonService {
public getById(id: String): Person {
return mockPerson;
}
} | DanielHabenicht/phonebook | Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.spec.ts | TypeScript |
MethodDeclaration |
public getById(id: String): Person {
return mockPerson;
} | DanielHabenicht/phonebook | Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.spec.ts | TypeScript |
ArrowFunction |
() => {
this.compute_indices()
this.change.emit()
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
() => {
const fn = () => this.compute_indices()
if (this.source != null) {
this.connect(this.source.change, fn)
if (this.source instanceof ColumnarDataSource) {
this.connect(this.source.streaming, fn)
this.connect(this.source.patching, fn)
}
}
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
() => this.compute_indices() | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
() => {
if (!initialized) {
connect_listeners()
initialized = true
}
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
(filter) => filter.compute_indices(this.source) | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
(indices) => indices != null | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
(i) => this.indices[i] | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
(i) => this.indices_map[i] | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ClassDeclaration |
export class CDSView extends Model {
properties: CDSView.Props
constructor(attrs?: Partial<CDSView.Attrs>) {
super(attrs)
}
static init_CDSView(): void {
this.define<CDSView.Props>({
filters: [ p.Array, [] ],
source: [ p.Instance ],
})
this.internal({
indices: [ p.Arr... | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
InterfaceDeclaration |
export interface CDSView extends CDSView.Attrs {} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
TypeAliasDeclaration |
export type Attrs = p.AttrsOf<Props> | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
TypeAliasDeclaration |
export type Props = Model.Props & {
filters: p.Property<Filter[]>
source: p.Property<ColumnarDataSource>
indices: p.Property<number[]>
indices_map: p.Property<{[key: string]: number}>
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
static init_CDSView(): void {
this.define<CDSView.Props>({
filters: [ p.Array, [] ],
source: [ p.Instance ],
})
this.internal({
indices: [ p.Array, [] ],
indices_map: [ p.Any, {} ],
})
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
initialize(): void {
super.initialize()
this.compute_indices()
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
connect_signals(): void {
super.connect_signals()
this.connect(this.properties.filters.change, () => {
this.compute_indices()
this.change.emit()
})
const connect_listeners = () => {
const fn = () => this.compute_indices()
if (this.source != null) {
this.connect(this.s... | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
compute_indices(): void {
const indices = this.filters
.map((filter) => filter.compute_indices(this.source))
.filter((indices) => indices != null)
if (indices.length > 0)
this.indices = intersection.apply(this, indices)
else if (this.source instanceof ColumnarDataSource)
this.indic... | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
indices_map_to_subset(): void {
this.indices_map = {}
for (let i = 0; i < this.indices.length; i++){
this.indices_map[this.indices[i]] = i
}
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
convert_selection_from_subset(selection_subset: Selection): Selection {
const selection_full = new Selection()
selection_full.update_through_union(selection_subset)
const indices_1d = selection_subset.indices.map((i) => this.indices[i])
selection_full.indices = indices_1d
selection_full.image_indic... | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
convert_selection_to_subset(selection_full: Selection): Selection {
const selection_subset = new Selection()
selection_subset.update_through_union(selection_full)
const indices_1d = selection_full.indices.map((i) => this.indices_map[i])
selection_subset.indices = indices_1d
selection_subset.image_i... | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
MethodDeclaration |
convert_indices_from_subset(indices: number[]): number[] {
return indices.map((i) => this.indices[i])
} | 3dprintscanner/bokeh | bokehjs/src/lib/models/sources/cds_view.ts | TypeScript |
ArrowFunction |
({ data }, ref) => {
return (
<AgGrid
ref={ref}
rowData={data}
overlayNoRowsTemplate="No orders"
defaultColDef={{ flex: 1, resizable: true }} | vegaprotocol/frontend-monorepo | libs/order-list/src/lib/order-list.tsx | TypeScript |
InterfaceDeclaration |
interface OrderListProps {
data: Orders_party_orders[] | null;
} | vegaprotocol/frontend-monorepo | libs/order-list/src/lib/order-list.tsx | TypeScript |
ClassDeclaration | /**
* <p>Gets the status and details of an events detection job.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ComprehendClient, DescribeEventsDetectionJobCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
* // const { ComprehendCl... | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
InterfaceDeclaration |
export interface DescribeEventsDetectionJobCommandInput extends DescribeEventsDetectionJobRequest {} | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
InterfaceDeclaration |
export interface DescribeEventsDetectionJobCommandOutput extends DescribeEventsDetectionJobResponse, __MetadataBearer {} | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
MethodDeclaration | /**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: ComprehendClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DescribeEventsDetectionJobCommandInput, DescribeEventsDetectionJobCommandOutput> {
this.middlewareSt... | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
MethodDeclaration |
private serialize(input: DescribeEventsDetectionJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DescribeEventsDetectionJobCommand(input, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<DescribeEventsDetectionJobCommandOutput> {
return deserializeAws_json1_1DescribeEventsDetectionJobCommand(output, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-comprehend/commands/DescribeEventsDetectionJobCommand.ts | TypeScript |
ArrowFunction |
(a, b) => b.lineNumber - a.lineNumber | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
InterfaceDeclaration |
export interface IValidatedEditOperation {
sortIndex: number;
identifier: ISingleEditOperationIdentifier;
range: Range;
rangeOffset: number;
rangeLength: number;
lines: string[];
forceMoveMarkers: boolean;
isAutoWhitespaceEdit: boolean;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
InterfaceDeclaration | /**
* A processed string with its EOL resolved ready to be turned into an editor model.
*/
export interface ITextSource {
/**
* The text split into lines.
*/
readonly lines: string[];
/**
* The BOM (leading character sequence of the file).
*/
readonly BOM: string;
/**
* The end of line sequen... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private _constructLineStarts(): void {
const eolLength = this._EOL.length;
const linesLength = this._lines.length;
const lineStartValues = new Uint32Array(linesLength);
for (let i = 0; i < linesLength; i++) {
lineStartValues[i] = this._lines[i].length + eolLength;
}
this._lineStarts = new... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public equals(other: ITextBuffer): boolean {
if (!(other instanceof LinesTextBuffer)) {
return false;
}
if (this._BOM !== other._BOM) {
return false;
}
if (this._EOL !== other._EOL) {
return false;
}
if (this._lines.length !== other._lines.length) {
return false;
... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public mightContainRTL(): boolean {
return this._mightContainRTL;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public mightContainNonBasicASCII(): boolean {
return this._mightContainNonBasicASCII;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getBOM(): string {
return this._BOM;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getEOL(): string {
return this._EOL;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getOffsetAt(lineNumber: number, column: number): number {
return this._lineStarts.getAccumulatedValue(lineNumber - 2) + column - 1;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getPositionAt(offset: number): Position {
offset = Math.floor(offset);
offset = Math.max(0, offset);
let out = this._lineStarts.getIndexOf(offset);
let lineLength = this._lines[out.index].length;
// Ensure we return a valid position
return new Position(out.index + 1, Math.min(out.rema... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getRangeAt(offset: number, length: number): Range {
const startResult = this._lineStarts.getIndexOf(offset);
const startLineLength = this._lines[startResult.index].length;
const startColumn = Math.min(startResult.remainder + 1, startLineLength + 1);
const endResult = this._lineStarts.getIndexOf... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private _getEndOfLine(eol: EndOfLinePreference): string {
switch (eol) {
case EndOfLinePreference.LF:
return '\n';
case EndOfLinePreference.CRLF:
return '\r\n';
case EndOfLinePreference.TextDefined:
return this.getEOL();
}
throw new Error('Unknown EOL preference');... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getValueInRange(range: Range, eol: EndOfLinePreference): string {
if (range.isEmpty()) {
return '';
}
if (range.startLineNumber === range.endLineNumber) {
return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1);
}
const lineEnding = t... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getValueLengthInRange(range: Range, eol: EndOfLinePreference): number {
if (range.isEmpty()) {
return 0;
}
if (range.startLineNumber === range.endLineNumber) {
return (range.endColumn - range.startColumn);
}
let startOffset = this.getOffsetAt(range.startLineNumber, range.startC... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineCount(): number {
return this._lines.length;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLinesContent(): string[] {
return this._lines.slice(0);
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineContent(lineNumber: number): string {
return this._lines[lineNumber - 1];
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineCharCode(lineNumber: number, index: number): number {
return this._lines[lineNumber - 1].charCodeAt(index);
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineLength(lineNumber: number): number {
return this._lines[lineNumber - 1].length;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineFirstNonWhitespaceColumn(lineNumber: number): number {
const result = firstNonWhitespaceIndex(this._lines[lineNumber - 1]);
if (result === -1) {
return 0;
}
return result + 1;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public getLineLastNonWhitespaceColumn(lineNumber: number): number {
const result = lastNonWhitespaceIndex(this._lines[lineNumber - 1]);
if (result === -1) {
return 0;
}
return result + 2;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration | //#region Editing
public setEOL(newEOL: string): void {
this._EOL = newEOL;
this._constructLineStarts();
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private static _sortOpsAscending(a: IValidatedEditOperation, b: IValidatedEditOperation): number {
let r = Range.compareRangesUsingEnds(a.range, b.range);
if (r === 0) {
return a.sortIndex - b.sortIndex;
}
return r;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private static _sortOpsDescending(a: IValidatedEditOperation, b: IValidatedEditOperation): number {
let r = Range.compareRangesUsingEnds(a.range, b.range);
if (r === 0) {
return b.sortIndex - a.sortIndex;
}
return -r;
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
public applyEdits(rawOperations: IIdentifiedSingleEditOperation[], recordTrimAutoWhitespace: boolean): ApplyEditsResult {
if (rawOperations.length === 0) {
return new ApplyEditsResult([], [], []);
}
let mightContainRTL = this._mightContainRTL;
let mightContainNonBasicASCII = this._mightContainNo... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration | /**
* Transform operations such that they represent the same logic edit,
* but that they also do not cause OOM crashes.
*/
private _reduceOperations(operations: IValidatedEditOperation[]): IValidatedEditOperation[] {
if (operations.length < 1000) {
// We know from empirical testing that a thousand ed... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
_toSingleEditOperation(operations: IValidatedEditOperation[]): IValidatedEditOperation {
let forceMoveMarkers = false,
firstEditRange = operations[0].range,
lastEditRange = operations[operations.length - 1].range,
entireEditRange = new Range(firstEditRange.startLineNumber, firstEditRange.startCol... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private _setLineContent(lineNumber: number, content: string, rawContentChanges: ModelRawChange[]): void {
this._lines[lineNumber - 1] = content;
this._lineStarts.changeValue(lineNumber - 1, content.length + this._EOL.length);
rawContentChanges.push(new ModelRawLineChanged(lineNumber, content));
} | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration |
private _doApplyEdits(operations: IValidatedEditOperation[]): [ModelRawChange[], IInternalModelContentChange[]] {
// Sort operations descending
operations.sort(LinesTextBuffer._sortOpsDescending);
let rawContentChanges: ModelRawChange[] = [];
let contentChanges: IInternalModelContentChange[] = [];
... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
MethodDeclaration | /**
* Assumes `operations` are validated and sorted ascending
*/
public static _getInverseEditRanges(operations: IValidatedEditOperation[]): Range[] {
let result: Range[] = [];
let prevOpEndLineNumber: number;
let prevOpEndColumn: number;
let prevOp: IValidatedEditOperation = null;
for (let i... | WaiSiuKei/fin | widgets/note/src/input/model/linesTextBuffer/linesTextBuffer.ts | TypeScript |
ArrowFunction |
(e) => {
this.loadConfigSettings();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
() => {
this.markOutput();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
() => {
this.clearOutput();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
async () => {
let entryText: string = await vscode.window.showInputBox({
placeHolder: 'Enter log include regex',
value: this.includeRegex ? this.includeRegex.source : ''
});
if (entryText || entryText === '') {
this.setIncludeFilter(en... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
async () => {
let entryText: string = await vscode.window.showInputBox({
placeHolder: 'Enter log level regex',
value: this.logLevelRegex ? this.logLevelRegex.source : ''
});
if (entryText || entryText === '') {
this.setLevelFilter(entr... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
async () => {
let entryText: string = await vscode.window.showInputBox({
placeHolder: 'Enter log exclude regex',
value: this.excludeRegex ? this.excludeRegex.source : ''
});
if (entryText || entryText === '') {
this.setExcludeFilter(en... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
async (compileError) => {
if (!errorsByPath[compileError.path]) {
errorsByPath[compileError.path] = [];
}
errorsByPath[compileError.path].push(compileError);
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
(compileError) => {
const path: string = compileError.path;
const message: string = compileError.message;
const source: string = compileError.errorText;
const lineNumber: number = compileError.lineNumber;
const charSta... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
(line) => {
if (line !== '') {
if (!this.includeStackTraces) {
// filter out debugger noise
if (line.match(this.debugStartRegex)) {
console.log('start MicroDebugger block');
this.isInMicroDebugger = true... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ClassDeclaration |
export class LogLine {
constructor(
public text: string,
public isMustInclude: boolean
) {
}
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public onDidStartDebugSession() {
this.isInMicroDebugger = false;
this.isNextBreakpointSkipped = false;
if (this.isClearingConsoleOnChannelStart) {
this.clearOutput();
}
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
private loadConfigSettings() {
let config: any = vscode.workspace.getConfiguration('brightscript') || {};
this.includeStackTraces = (config.output || {}).includeStackTraces;
this.isFocusingOutputOnLaunch = config?.output?.focusOnLaunch === false ? false : true;
this.isClearingOutputOnLa... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public setLaunchConfig(launchConfig: BrightScriptLaunchConfiguration) {
this.launchConfig = launchConfig;
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public onDidReceiveDebugSessionCustomEvent(e: any) {
if (e.event === 'BSRendezvousEvent') {
// No need to handle rendezvous type events
return;
}
console.log('received event ' + e.event);
if (e.event === 'BSLogOutputEvent') {
this.appendLine(e.body);... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public async addDiagnosticForError(path: string, compileErrors: BrightScriptDebugCompileError[]) {
//TODO get the actual folder
let documentUri: vscode.Uri;
let uri = vscode.Uri.file(path);
let doc = await vscode.workspace.openTextDocument(uri); // calls back
if (doc !== undefi... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration | /**
* Log output methods
*/
public appendLine(lineText: string, mustInclude: boolean = false): void {
let lines = lineText.split('\n');
lines.forEach((line) => {
if (line !== '') {
if (!this.includeStackTraces) {
// filter out debugger noise
... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public writeLogLineToLogfile(text: string) {
if (this.launchConfig?.logfilePath) {
fsExtra.appendFileSync(this.launchConfig.logfilePath, text + '\n');
}
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public addLogLineToOutput(logLine: LogLine) {
const logLineNumber = this.displayedLogLines.length;
if (this.matchesFilter(logLine)) {
this.displayedLogLines.push(logLine);
let match = this.pkgRegex.exec(logLine.text);
if (match) {
const pkgPath = matc... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public getFilename(pkgPath: string): string {
const parts = pkgPath.split('/');
let name = parts.length > 0 ? parts[parts.length - 1] : pkgPath;
if (name.toLowerCase().endsWith('.xml') || name.toLowerCase().endsWith('.brs')) {
name = name.substring(0, name.length - 4);
}
... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public getCustomLogText(pkgPath: string, filename: string, extension: string, lineNumber: number, logLineNumber: number): string {
switch (this.hyperlinkFormat) {
case 'Full':
return pkgPath + `(${lineNumber})`;
break;
case 'Short':
return... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public getMethodName(pkgPath: string, lineNumber: number): string | null {
let fsPath = this.docLinkProvider.convertPkgPathToFsPath(pkgPath);
const method = this.declarationProvider.getFunctionBeforeLine(fsPath, lineNumber);
return method ? method.name : null;
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public matchesFilter(logLine: LogLine): boolean {
return (logLine.isMustInclude || (
(!this.logLevelRegex || this.logLevelRegex.test(logLine.text)))
&& (!this.includeRegex || this.includeRegex.test(logLine.text)))
&& (!this.excludeRegex || !this.excludeRegex.test(logLine.tex... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public clearOutput(): any {
this.markCount = 0;
this.allLogLines = [];
this.displayedLogLines = [];
this.outputChannel.clear();
this.collection.clear();
this.docLinkProvider.resetCustomLinks();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public setIncludeFilter(text: string): void {
this.includeRegex = text && text.trim() !== '' ? new RegExp(text, 'i') : null;
this.reFilterOutput();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public setExcludeFilter(text: string): void {
this.excludeRegex = text && text.trim() !== '' ? new RegExp(text, 'i') : null;
this.reFilterOutput();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public setLevelFilter(text: string): void {
this.logLevelRegex = text && text.trim() !== '' ? new RegExp(text, 'i') : null;
this.reFilterOutput();
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public reFilterOutput(): void {
this.outputChannel.clear();
this.docLinkProvider.resetCustomLinks();
for (let i = 0; i < this.allLogLines.length - 1; i++) {
let logLine = this.allLogLines[i];
if (this.matchesFilter(logLine)) {
this.addLogLineToOutput(log... | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
MethodDeclaration |
public markOutput(): void {
this.appendLine(`---------------------- MARK ${this.markCount} ----------------------`, true);
this.markCount++;
} | jfrux/vscode-brightscript-language | src/LogOutputManager.ts | TypeScript |
ArrowFunction |
type => this.typeCreateForm.patchValue(type) | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
ArrowFunction |
res => {
let id = res['_id'];
this.router.navigate(['settings/item/types/details', id]);
} | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-type-create',
templateUrl: './type-create.component.html',
styleUrls: ['./type-create.component.css']
})
export class TypeCreateComponent implements OnInit {
type = {};
typeCreateForm: FormGroup;
pageType = 'Create';
id = this.route.snapshot.params['id'];
constructor(
... | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.setupForm(this.id);
} | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
MethodDeclaration |
setupForm(id) {
if(this.route.snapshot.data.update){
this.pageType = 'Update';
this.api.get('Type',id).subscribe(
type => this.typeCreateForm.patchValue(type)
);
}
} | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
MethodDeclaration |
createForm(){
this.typeCreateForm = this.fb.group({
name: '',
description: ''
});
} | databucketsolutions/AngularPOS | src/app/settings/settings-item/settings-type/type-create/type-create.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.