type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
let input =
"1 LETTERS G A G SIGNS & EXIT_SIGNS B EXIT_LETTERS 3"
let lexResult = ModeLexer.tokenize(input)
expect(lexResult.errors).to.be.empty
let images = map(lexResult.tokens, currTok => currTok.image)
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
currTok => currTok.image | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let input = "1 LETTERS EXIT_LETTERS +"
let lexResult = ModeLexer.tokenize(input)
expect(lexResult.errors).to.have.lengthOf(1)
expect(lexResult.errors[0].message).to.equal(
"unexpected character: ->+<- at off... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let input = "A G SIGNS ^"
let lexResult = ModeLexer.tokenize(input, "letters")
expect(lexResult.errors).to.be.empty
let images = map(lexResult.tokens, currTok => currTok.image)
expect(images).to.deep.equal(["A"... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let input = "1 LETTERS 1A"
let lexResult = ModeLexer.tokenize(input)
expect(lexResult.errors).to.have.lengthOf(1)
expect(lexResult.errors[0].message).to.include("skipped 1")
expect(lexResult.errors[0].message).t... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let input = "1 EXIT_NUMBERS 2"
let lexResult = ModeLexer.tokenize(input)
expect(lexResult.errors).to.have.lengthOf(1)
expect(lexResult.errors[0].message).to.include(
">EXIT_NUMBERS<"
)
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let input = "LETTERS SIGNS_AND_EXIT_LETTERS &"
let lexResult = ModeLexer.tokenize(input)
expect(lexResult.errors).to.be.empty
let images = map(lexResult.tokens, currTok => currTok.image)
expect(images).to.deep.... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
const One = createToken({ name: "One", pattern: /1/ })
const Two = createToken({ name: "Two", pattern: /2/ })
const Alpha = createToken({ name: "Alpha", pattern: /A/ })
const Beta = createToken({ name: "Beta", pattern: /B/ })
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let lexerDef: any = {
modes___: {
// typo in 'modes' property name
},
defaultMode: ""
}
let badLexer = new Lexer(lexerDef, {
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let lexerDef: any = {
modes: {},
defaultMode___: "" // typo in 'defaultMode' property name
}
let badLexer = new Lexer(lexerDef, {
deferDefinitionErrorsHandling: true,
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let lexerDef: any = {
modes: {
bamba: []
},
defaultMode: "bisli"
}
let badLexer = new Lexer(lexerDef, {
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let lexerDef: any = [
Alpha,
Beta /* this is undefined */,
,
Gamma
]
let badLexer = new Lexer(lexerDef, {
deferDefinitionErrorsHand... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
function defineCustomPatternSpec(variant, customPattern) {
it(variant, () => {
let time = 1
function extraContextValidator(
text,
offset,
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let time = 1
function extraContextValidator(
text,
offset,
tokens,
groups
) {
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
(text, offset) =>
/^\s+/.exec(text.substring(offset)) | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
(text, offset) => /^B/.exec(text.substring(offset)) | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
(text, offset) =>
/^B/.exec(text.substring(offset)) | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
before(disableSticky)
lexerSpecs()
after(enableSticky)
} | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
let consoleSpy
beforeEach(function() {
// @ts-ignore
consoleSpy = sinon.spy(console, "error")
})
afterEach(function() {
// @ts-ignore
console.error.restore()
})
it("not report unicode flag", () => {
// using new RegExp() to avoid IE 11 syntax e... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
// using new RegExp() to avoid IE 11 syntax errors
const One = createToken({ name: "One", pattern: new RegExp("1", "u") })
new Lexer([One], { positionTracking: "onlyOffset" })
expect(console.error).to.have.not.been.called
} | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
// using new RegExp() to avoid IE 11 syntax errors
const One = createToken({ name: "One", pattern: new RegExp("1", "u") })
expect(
() =>
new Lexer([One], {
ensureOptimizations: true,
positionTracking: "onlyOffset"
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() =>
new Lexer([One], {
ensureOptimizations: true,
positionTracking: "onlyOffset"
}) | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
const One = createToken({
name: "One",
pattern: (text, offset) => {
return /1/.exec(text)
}
})
expect(
() =>
new Lexer([One], {
ensureOptimizations: true,
positionTrac... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
(text, offset) => {
return /1/.exec(text)
} | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
// using new RegExp() to avoid IE 11 syntax errors
const One = createToken({ name: "One", pattern: new RegExp("1", "u") })
expect(
() =>
new Lexer([One], {
safeMode: true,
ensureOptimizations: true,
... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() =>
new Lexer([One], {
safeMode: true,
ensureOptimizations: true,
positionTracking: "onlyOffset"
}) | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
// without hints we expect the lexer
const PileOfPooNoHints = createToken({
name: "PileOfPoo",
pattern: /💩/
})
const pooLexerNoHints = new Lexer([PileOfPooNoHints], {
positionTracking: "onlyOffset"
})
expect(
keys(... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ArrowFunction |
() => {
const Alpha = createToken({
name: "A",
pattern: /a/
})
const alphaLexerSafeMode = new Lexer([Alpha], {
positionTracking: "onlyOffset",
safeMode: true
})
expect(
(<any>alphaLexerSafeMode).charCodeToPatternIdxToCo... | benjie/chevrotain | test/scan/lexer_spec.ts | TypeScript |
ClassDeclaration |
export class ListVersionsResponseAllOf {
'nextVersion'?: number;
'versions'?: Array<ListVersionsResponseAllOfVersions>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "nextVersion",... | AItoAir/edge-impulse-linux-cli | sdk/studio/model/listVersionsResponseAllOf.ts | TypeScript |
MethodDeclaration |
static getAttributeTypeMap() {
return ListVersionsResponseAllOf.attributeTypeMap;
} | AItoAir/edge-impulse-linux-cli | sdk/studio/model/listVersionsResponseAllOf.ts | TypeScript |
FunctionDeclaration |
function ScoreIcon(props: {header: string, score: number}) {
const {header, score} = props;
// score between -2 and 2
return (
<Tooltip title={`${header} Score = ${score}`} | Fair-Exchange/safestake | src/components/ValidatorScoreTray.tsx | TypeScript |
FunctionDeclaration |
export function ValidatorScoreTray(props: {validatorScore: ValidatorScore}) {
const { validatorScore } = props;
return (
<Typography>
<ScoreIcon header="Root Distance" score={validatorScore.root_distance_score} />
<ScoreIcon header="Vote Distance" score={validatorScore.vote_distance_score} />
... | Fair-Exchange/safestake | src/components/ValidatorScoreTray.tsx | TypeScript |
InterfaceDeclaration | /**
* @internal
*/
export interface PaintGeometry {
sx: number
sy: number
tx: number
ty: number
xSpan: number
ySpan: number
mx: number
my: number
so: Orientation
to: Orientation
x: number
y: number
w: number
h: number
segment: number
startStubX: number
... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
TypeAliasDeclaration | /**
* @internal
*/
type SegmentForPoint = { d: number, s: Segment, x: number, y: number, l: number, x1:number, y1:number, x2:number, y2:number, index:number, connectorLocation: number } | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
TypeAliasDeclaration |
export type ConnectorComputeParams = {
sourcePos: AnchorPlacement,
targetPos: AnchorPlacement,
sourceEndpoint: Endpoint,
targetEndpoint: Endpoint,
strokeWidth: number,
sourceInfo: ViewportElement<any>,
targetInfo: ViewportElement<any>
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
abstract getDefaultStubs():[number, number] | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
getTypeDescriptor ():string {
return "connector"
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
getIdPrefix () { return "_jsplumb_connector"; } | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
protected setGeometry(g:Geometry, internal:boolean) {
this.geometry = g
this.edited = g != null && !internal
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration | /**
* Subclasses can override this. By default we just pass back the geometry we are using internally.
*/
exportGeometry():Geometry {
return this.geometry
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration | /**
* Subclasses can override this. By default we just set the given geometry as our internal representation.
*/
importGeometry(g:Geometry):boolean {
this.geometry = g
return true
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
resetGeometry():void {
this.geometry = null
this.edited = false
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
abstract _compute(geometry:PaintGeometry, params:ConnectorComputeParams):void | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
resetBounds():void {
this.bounds = EMPTY_BOUNDS()
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration | /**
* Function: findSegmentForPoint
* Returns the segment that is closest to the given [x,y],
* null if nothing found. This function returns a JS
* object with:
*
* d - distance from segment
* l - proportional location in segment
* x - x point on the segment
... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
lineIntersection (x1:number, y1:number, x2:number, y2:number):Array<PointXY> {
let out:Array<PointXY> = []
for (let i = 0; i < this.segments.length; i++) {
out.push.apply(out, this.segments[i].lineIntersection(x1, y1, x2, y2))
}
return out
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
boxIntersection (x:number, y:number, w:number, h:number):Array<PointXY> {
let out:Array<PointXY> = []
for (let i = 0; i < this.segments.length; i++) {
out.push.apply(out, this.segments[i].boxIntersection(x, y, w, h))
}
return out
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
boundingBoxIntersection (box:any):Array<PointXY> {
let out:Array<PointXY> = []
for (let i = 0; i < this.segments.length; i++) {
out.push.apply(out, this.segments[i].boundingBoxIntersection(box))
}
return out
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
_updateSegmentProportions () {
let curLoc = 0
for (let i = 0; i < this.segments.length; i++) {
let sl = this.segments[i].getLength()
this.segmentProportionalLengths[i] = sl / this.totalLength
this.segmentProportions[i] = [curLoc, (curLoc += (sl / this.totalLength)) ]... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration | /**
* returns [segment, proportion of travel in segment, segment index] for the segment
* that contains the point which is 'location' distance along the entire path, where
* 'location' is a decimal between 0 and 1 inclusive. in this connector type, paths
* are made up of a list of segments, each of ... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
_addSegment (clazz:Constructable<Segment>, params:any) {
if (params.x1 === params.x2 && params.y1 === params.y2) {
return
}
let s = (new clazz(params))
this.segments.push(s)
this.totalLength += s.getLength()
this.updateBounds(s)
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
_clearSegments () {
this.totalLength = 0
this.segments.length = 0
this.segmentProportions.length = 0
this.segmentProportionalLengths.length = 0
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
getLength ():number {
return this.totalLength
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
private _prepareCompute (params:ConnectorComputeParams):PaintGeometry {
this.strokeWidth = params.strokeWidth
let x1 = params.sourcePos.curX,
x2 = params.targetPos.curX,
y1 = params.sourcePos.curY,
y2 = params.targetPos.curY,
segment = quadrant({x:x1, y:... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
updateBounds (segment:Segment):void {
let segBounds = segment.extents
this.bounds.xmin = Math.min(this.bounds.xmin, segBounds.xmin)
this.bounds.xmax = Math.max(this.bounds.xmax, segBounds.xmax)
this.bounds.ymin = Math.min(this.bounds.ymin, segBounds.ymin)
this.bounds.ymax = Math... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
private dumpSegmentsToConsole ():void {
log("SEGMENTS:")
for (let i = 0; i < this.segments.length; i++) {
log(this.segments[i].type, "" + this.segments[i].getLength(), "" + this.segmentProportions[i])
}
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
pointOnPath (location:number, absolute?:boolean):PointXY {
let seg = this._findSegmentForLocation(location, absolute)
return seg.segment && seg.segment.pointOnPath(seg.proportion, false) || {x:0, y:0}
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
gradientAtPoint (location:number, absolute?:boolean):number {
let seg = this._findSegmentForLocation(location, absolute)
return seg.segment && seg.segment.gradientAtPoint(seg.proportion, false) || 0
} | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
pointAlongPathFrom (location:number, distance:number, absolute?:boolean):PointXY {
let seg = this._findSegmentForLocation(location, absolute)
// TODO what happens if this crosses to the next segment?
return seg.segment && seg.segment.pointAlongPathFrom(seg.proportion, distance, false) || {x:0, ... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration |
compute (params:ConnectorComputeParams):void {
this.paintInfo = this._prepareCompute(params)
this._clearSegments()
this._compute(this.paintInfo, params)
this.x = this.paintInfo.points[0]
this.y = this.paintInfo.points[1]
this.w = this.paintInfo.points[2]
this.h =... | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
MethodDeclaration | //
// a dummy implementation for subclasses to override if they want to.
//
setAnchorOrientation(idx:number, orientation:number[]):void { } | collabsoft/jsplumb | ts/core/connector/abstract-connector.ts | TypeScript |
ArrowFunction |
async () => {
it('should group issues by associated categories when checked', async () => {
await goToResource('elements/element-reveal-inline-issue.html');
await navigateToIssuesTab();
if (!await getGroupByCategoryChecked()) {
await toggleGroupByCategory();
}
await expandCategory();
... | zys-contrib/devtools-frontend | test/e2e/issues/group-by-categories_test.ts | TypeScript |
ArrowFunction |
async () => {
await goToResource('elements/element-reveal-inline-issue.html');
await navigateToIssuesTab();
if (!await getGroupByCategoryChecked()) {
await toggleGroupByCategory();
}
await expandCategory();
await assertCategoryName('Content Security Policy');
await expandIssue();
... | zys-contrib/devtools-frontend | test/e2e/issues/group-by-categories_test.ts | TypeScript |
ArrowFunction |
async () => {
await goToResource('elements/element-reveal-inline-issue.html');
await navigateToIssuesTab();
if (await getGroupByCategoryChecked()) {
await toggleGroupByCategory();
}
await expandIssue();
await assertIssueTitle('Content Security Policy blocks inline execution of scripts a... | zys-contrib/devtools-frontend | test/e2e/issues/group-by-categories_test.ts | TypeScript |
ArrowFunction |
(props) => {
const [globalState, globalActions] = useGlobal()
const tlt = props.tlt
const {
setState,
editTaskListType,
deleteTaskListType,
deleteTaskType,
addTaskType
} = globalActions
const {
taskListTypes,
currentTaskType
} = globalState
const [newVisible, setNewVisible] =... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event) => {
deleteTaskListType(tlt)
.subscribe(() => {
setState({
taskListTypes: taskListTypes.filter((item) => item.uid !== tlt.uid)
})
})
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => {
setState({
taskListTypes: taskListTypes.filter((item) => item.uid !== tlt.uid)
})
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(item) => item.uid !== tlt.uid | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event, item) => {
const deleteItem = { uid: tlt.uid, hasTaskTypes: { uid: item.uid } }
deleteTaskType(deleteItem)
.subscribe(() => {
const list = taskListTypes.filter((tltItem) => tltItem.uid !== tlt.uid)
const ttList = tlt.taskTypes.filter((ttItem) => ttItem.uid !== item.uid)
co... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => {
const list = taskListTypes.filter((tltItem) => tltItem.uid !== tlt.uid)
const ttList = tlt.taskTypes.filter((ttItem) => ttItem.uid !== item.uid)
const ownerItem = { ...tlt, taskTypes: ttList }
const newList = [...list, ownerItem]
setState({taskListTypes: newList})
... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(tltItem) => tltItem.uid !== tlt.uid | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(ttItem) => ttItem.uid !== item.uid | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event) => {
of(setState({ currentTaskType: blankTaskType }))
.subscribe(() => setNewVisible(true))
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => setNewVisible(true) | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event) => {
of(setState({ currentTaskType: blankTaskType }))
.subscribe(() => setNewVisible(false))
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => setNewVisible(false) | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event, taskListType) => {
editTaskListType(taskListType)
.subscribe(prom => {
prom.then(tlts => {
tlts.subscribe(list => {
setState({
taskListTypes: list,
currentTaskListType: blankTaskListType
})
hideEdit()
})
... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
prom => {
prom.then(tlts => {
tlts.subscribe(list => {
setState({
taskListTypes: list,
currentTaskListType: blankTaskListType
})
hideEdit()
})
})
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
tlts => {
tlts.subscribe(list => {
setState({
taskListTypes: list,
currentTaskListType: blankTaskListType
})
hideEdit()
})
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
list => {
setState({
taskListTypes: list,
currentTaskListType: blankTaskListType
})
hideEdit()
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event, taskType) => {
addTaskType(taskType)
.subscribe(prom => {
prom.then(tls => {
const item = { ...currentTaskType, uid: tls.uid }
const taskListType = {
...tlt,
taskTypes: [...tlt.taskTypes, item]
}
const oldTaskListTypes = taskList... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
prom => {
prom.then(tls => {
const item = { ...currentTaskType, uid: tls.uid }
const taskListType = {
...tlt,
taskTypes: [...tlt.taskTypes, item]
}
const oldTaskListTypes = taskListTypes
.filter(oldtlt => oldtlt.uid !== tlt.uid)
... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
tls => {
const item = { ...currentTaskType, uid: tls.uid }
const taskListType = {
...tlt,
taskTypes: [...tlt.taskTypes, item]
}
const oldTaskListTypes = taskListTypes
.filter(oldtlt => oldtlt.uid !== tlt.uid)
const updatedTaskListTyp... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
oldtlt => oldtlt.uid !== tlt.uid | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event) => {
of(setState({ currentTaskListType: tlt }))
.subscribe(() => showEdit())
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => showEdit() | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(event) => {
of(setState({ currentTaskType: blankTaskType }))
.subscribe(() => hideEdit())
} | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => hideEdit() | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => {
if(newVisible) {
return (
<TaskTypeForm
tt={ currentTaskType }
handleCancel={ handleCancelNew }
handleSave={ handleSaveTaskType }
ownerUid={tlt.uid}/> | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => {
const taskTypeList = tlt.taskTypes || []
if(taskTypeList.length > 0) {
return taskTypeList.map((item, index) => {
return (
<TaskType
key={ `taskType-${ item.uid }` }
item={ item }
ownerUid={ tlt.uid }
handleDelete={ handleDeleteTas... | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
(item, index) => {
return (
<TaskType
key={ `taskType-${ item.uid }` } | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ArrowFunction |
() => {
if(editVisible) {
return (
<TaskListTypeForm
tlt={ tlt }
handleCancel={ handleCancelEdit }
handleSave={ handleSave }/> | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
MethodDeclaration |
formOrData() | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
MethodDeclaration |
taskTypes() | bmw2621/vwc_fng_tracker | vwc_fng_tracker_fe/src/components/Tasks/TaskListType/TaskListTypeItem.tsx | TypeScript |
ClassDeclaration |
export default class ExchangeRequestMessage extends Message {
public exchangeType: number;
constructor(exchangeType = 0) {
super();
this.exchangeType = exchangeType;
}
} | Joryss/cookietouch | src/cookie/protocol/network/messages/ExchangeRequestMessage.ts | TypeScript |
ArrowFunction |
(size: number): string => {
let str: string;
if (size >= 1024 * 1024) {
str = (size / 1024 / 1024).toFixed(2);
str = `${str} MB`;
} else if (size >= 1024) {
str = (size / 1024).toFixed(2);
str = `${str} KB`;
} else {
str = `${size} B`;
}
return str;
} | bmybbs/bmybbs-content-parser | src/utils.ts | TypeScript |
InterfaceDeclaration |
export interface DeployedModel {
/**
* deploymentID is ModelDeployment that deploys this model
*/
deploymentID?: string;
servedModel?: models.ServedModel;
} | odahu/odahu-ui | src/models/service-catalog/DeployedModel.ts | TypeScript |
FunctionDeclaration |
export function createAuthClient(authServerUri: string) {
return new AuthClient(authServerUri);
} | biancadanforth/fxa | packages/fxa-settings/src/lib/auth.ts | TypeScript |
FunctionDeclaration |
export function useAuth() {
const { auth } = useContext(AuthContext);
if (!auth) {
throw new Error('Are you forgetting an AuthContext.Provider?');
}
return auth!;
} | biancadanforth/fxa | packages/fxa-settings/src/lib/auth.ts | TypeScript |
FunctionDeclaration |
export function usePasswordChanger({
onSuccess,
onError,
}: {
onSuccess?: (r: PasswordChangeResponse) => void;
onError?: (e: AuthServerError) => void;
} = {}) {
const auth = useAuth();
return useAsyncCallback(
async (
email: string,
oldPassword: string,
newPassword: string,
sess... | biancadanforth/fxa | packages/fxa-settings/src/lib/auth.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.