type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
update(params: Params$Resource$Sinks$Update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
update(params: Params$Resource$Sinks$Update, options: MethodOptions | BodyResponseCallback<Schema$LogSink>, callback: BodyResponseCallback<Schema$LogSink>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
update(params: Params$Resource$Sinks$Update, callback: BodyResponseCallback<Schema$LogSink>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration | /**
* logging.getCmekSettings
* @desc Gets the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.See Enabling CMEK for Logs Router (http... | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
getCmekSettings(params?: Params$Resource$V2$Getcmeksettings, options?: MethodOptions): GaxiosPromise<Schema$CmekSettings>; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
getCmekSettings(params: Params$Resource$V2$Getcmeksettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
getCmekSettings(params: Params$Resource$V2$Getcmeksettings, options: MethodOptions | BodyResponseCallback<Schema$CmekSettings>, callback: BodyResponseCallback<Schema$CmekSettings>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
getCmekSettings(params: Params$Resource$V2$Getcmeksettings, callback: BodyResponseCallback<Schema$CmekSettings>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration | /**
* logging.updateCmekSettings
* @desc Updates the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.UpdateCmekSettings will fail if 1... | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
updateCmekSettings(params?: Params$Resource$V2$Updatecmeksettings, options?: MethodOptions): GaxiosPromise<Schema$CmekSettings>; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
updateCmekSettings(params: Params$Resource$V2$Updatecmeksettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
updateCmekSettings(params: Params$Resource$V2$Updatecmeksettings, options: MethodOptions | BodyResponseCallback<Schema$CmekSettings>, callback: BodyResponseCallback<Schema$CmekSettings>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
MethodDeclaration |
updateCmekSettings(params: Params$Resource$V2$Updatecmeksettings, callback: BodyResponseCallback<Schema$CmekSettings>): void; | GumballWatterson00/DevCBatch1Project | node_modules/googleapis/build/src/apis/logging/v2.d.ts | TypeScript |
ArrowFunction |
(e, panzoom, scale) => {
this.currentZoomLevel = scale;
JsplumbBridge.setZoom(scale);
JsplumbBridge.repaintEverything();
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
() => {
if (this.currentModifiedPipelineId) {
this.currentModifiedPipelineId = undefined;
}
this.clearAssembly();
this.TransitionService.makePipelineAssemblyEmpty(true);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
msg => {
this.pipelineCached = false;
this.pipelineCacheRunning = false;
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
msg => {
if (msg.data !== "") {
this.rawPipelineModel = msg.data;
this.$timeout(() => {
this.displayPipelineInEditor(true);
});
}
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
() => {
this.displayPipelineInEditor(true);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
(msg) => {
let pipeline = msg.data;
this.currentPipelineName = pipeline.name;
this.currentPipelineDescription = pipeline.description;
this.rawPipelineModel = this.JsplumbService.makeRawPipeline(pipeline, false);
this.$timeout(() => {
... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
pe => pe.settings.disabled | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ClassDeclaration |
export class PipelineAssemblyController {
$timeout: any;
$state: any;
JsplumbService: any;
PipelineEditorService: any;
JsplumbBridge: any;
ObjectProvider: any;
DialogBuilder: any;
EditorDialogManager: any;
currentMouseOverElement: any;
currentZoomLevel: any;
preview: any;
... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
$onInit() {
if (this.currentModifiedPipelineId) {
this.displayPipelineById();
} else {
this.checkAndDisplayCachedPipeline();
}
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
autoLayout() {
this.PipelinePositioningService.layoutGraph("#assembly", "span[id^='jsplumb']", 110, false);
this.JsplumbBridge.repaintEverything();
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
toggleSelectMode() {
if (this.selectMode) {
($("#assembly") as any).panzoom("option", "disablePan", false);
($("#assembly") as any).selectable("disable");
this.selectMode = false;
}
else {
($("#assembly") as any).panzoom("option", "disablePan", tr... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
zoomOut() {
this.doZoom(true);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
zoomIn() {
this.doZoom(false);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
doZoom(zoomOut) {
($("#assembly") as any).panzoom("zoom", zoomOut);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
showClearAssemblyConfirmDialog(ev) {
this.EditorDialogManager.showClearAssemblyDialog(ev).then(() => {
if (this.currentModifiedPipelineId) {
this.currentModifiedPipelineId = undefined;
}
this.clearAssembly();
this.TransitionService.makePipelineAss... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration | /**
* clears the Assembly of all elements
*/
clearAssembly() {
//$('#assembly').children().not('#clear, #submit').remove();
this.JsplumbBridge.deleteEveryEndpoint();
this.rawPipelineModel = [];
($("#assembly") as any).panzoom("reset", {
disablePan: true,
... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration | /**
* Sends the pipeline to the server
*/
submit() {
var pipeline = this.ObjectProvider.makeFinalPipeline(this.rawPipelineModel);
pipeline.name = this.currentPipelineName;
pipeline.description = this.currentPipelineDescription;
if (this.currentModifiedPipelineId) {
... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
openPipelineNameModal(pipeline, modificationMode) {
this.EditorDialogManager.showSavePipelineDialog(pipeline, modificationMode);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
checkAndDisplayCachedPipeline() {
this.RestApi.getCachedPipeline().then(msg => {
if (msg.data !== "") {
this.rawPipelineModel = msg.data;
this.$timeout(() => {
this.displayPipelineInEditor(true);
});
}
});
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
displayPipelineById() {
this.RestApi.getPipelineById(this.currentModifiedPipelineId)
.then((msg) => {
let pipeline = msg.data;
this.currentPipelineName = pipeline.name;
this.currentPipelineDescription = pipeline.description;
this.rawPi... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
displayPipelineInEditor(autoLayout) {
this.PipelinePositioningService.displayPipeline(this.rawPipelineModel, "#assembly", false, autoLayout);
this.TransitionService.makePipelineAssemblyEmpty(false);
this.pipelineValid = this.PipelineValidationService.isValidPipeline(this.rawPipelineModel);
... | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
toggleErrorMessagesDisplayed() {
this.errorMessagesDisplayed = !(this.errorMessagesDisplayed);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
MethodDeclaration |
isPipelineAssemblyEmpty() {
return this.rawPipelineModel.length === 0 || this.rawPipelineModel.every(pe => pe.settings.disabled);
} | JLLeitschuh/incubator-streampipes | ui/src/app/editor/components/pipeline-assembly/pipeline-assembly.controller.ts | TypeScript |
ArrowFunction |
() => {
const g = new VisibilityGraph()
g.AddVertexP(new Point(0, 0))
g.AddVertexP(new Point(0, 1))
const vv = [...g.Vertices()]
expect(vv.length).toBe(2)
} | microsoft/msagljs | modules/core/test/routing/visibility/VisibilityGraph.spec.ts | TypeScript |
ArrowFunction |
() => {
const g = new VisibilityGraph()
g.AddVertexP(new Point(0, 0))
g.AddVertexP(new Point(0, 1))
const v = g.FindVertex(new Point(0, 0))
expect(v.point.equal(new Point(0, 0))).toBe(true)
const u = g.FindVertex(new Point(0, 0.5))
expect(u == undefined).toBe(true)
g.RemoveVertex(v)
} | microsoft/msagljs | modules/core/test/routing/visibility/VisibilityGraph.spec.ts | TypeScript |
ArrowFunction |
() => {
const g = new VisibilityGraph()
const a = new Point(0, 0)
const b = new Point(1, 2)
const c = new Point(5, 0)
g.AddVertexP(a)
g.AddVertexP(b)
g.AddVertexP(c)
const ab = g.AddEdgePP(a, b)
const e_ab = g.FindEdgePP(a, b)
expect(ab).toBe(e_ab)
} | microsoft/msagljs | modules/core/test/routing/visibility/VisibilityGraph.spec.ts | TypeScript |
FunctionDeclaration | /**
* Adds new reaction to database
*/
export async function addReaction(reactionData: Reaction) {
reactionData.created = new Date();
const add = await new Promise<boolean>((resolve, reject) => {
db.collection("reactions").add(reactionData).then(response => {
resolve(true);
}).catc... | ideaguy3d/wordmime-cms-template | server/db/reactions/addReaction.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
db.collection("reactions").add(reactionData).then(response => {
resolve(true);
}).catch(error => {
return reject(false);
})
} | ideaguy3d/wordmime-cms-template | server/db/reactions/addReaction.ts | TypeScript |
ArrowFunction |
response => {
resolve(true);
} | ideaguy3d/wordmime-cms-template | server/db/reactions/addReaction.ts | TypeScript |
ArrowFunction |
error => {
return reject(false);
} | ideaguy3d/wordmime-cms-template | server/db/reactions/addReaction.ts | TypeScript |
FunctionDeclaration |
function renderClassMap(cssInfo: ClassInfo) {
render(html`<div class="${classMap(cssInfo)}"></div>`, container);
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
FunctionDeclaration |
function renderClassMapStatic(cssInfo: ClassInfo) {
render(html`<div class="aa ${classMap(cssInfo)} bb "></div>`, container);
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
let container: HTMLDivElement;
function renderClassMap(cssInfo: ClassInfo) {
render(html`<div class="${classMap(cssInfo)}"></div>`, container);
}
function renderClassMapStatic(cssInfo: ClassInfo) {
render(html`<div class="aa ${classMap(cssInfo)} bb "></div>`, container);
}
setup(() => {... | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
container = document.createElement('div');
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
renderClassMap({foo: 0, bar: true, zonk: true});
const el = container.firstElementChild!;
assert.isFalse(el.classList.contains('foo'));
assert.isTrue(el.classList.contains('bar'));
assert.isTrue(el.classList.contains('zonk'));
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
renderClassMap({foo: true, bar: true, baz: true});
const el = container.firstElementChild!;
assert.isTrue(el.classList.contains('foo'));
assert.isTrue(el.classList.contains('bar'));
assert.isTrue(el.classList.contains('baz'));
renderClassMap({foo: false, bar: true, baz: false});
ass... | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
renderClassMap({foo: true, bar: true, baz: true});
const el = container.firstElementChild!;
assert.isTrue(el.classList.contains('foo'));
assert.isTrue(el.classList.contains('bar'));
assert.isTrue(el.classList.contains('baz'));
renderClassMap({});
assert.isFalse(el.classList.contains... | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
renderClassMapStatic({foo: true});
const el = container.firstElementChild!;
assert.isTrue(el.classList.contains('aa'));
assert.isTrue(el.classList.contains('bb'));
assert.isTrue(el.classList.contains('foo'));
renderClassMapStatic({});
assert.isTrue(el.classList.contains('aa'));
... | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
assert.throws(() => {
render(html`<div id="${classMap({})}"></div>`, container);
});
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
render(html`<div id="${classMap({})}"></div>`, container);
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
assert.throws(() => {
render(html`<div class="${'hi'} ${classMap({})}"></div>`, container);
});
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
render(html`<div class="${'hi'} ${classMap({})}"></div>`, container);
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
assert.throws(() => {
render(html`<div>${classMap({})}</div>`, container);
});
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ArrowFunction |
() => {
render(html`<div>${classMap({})}</div>`, container);
} | Alexendoo/lit-html | src/test/directives/classMap_test.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class NavbarComponent implements OnInit {
constructor(private authService: AuthService) { }
ngOnInit() {
}
} | dimashmundiak/TripBook | TripBook/TripBook.Client/src/app/components/navbar/navbar.component.ts | TypeScript |
ArrowFunction |
() => {
const url = window.location.href.includes('app-q0')
? 'https://app-q0.adeo.no/veilarbpersonflatefs/'
: 'https://app.adeo.no/veilarbpersonflatefs/';
return (
<Alertstripe type="advarsel" className={cls.block}>
<Element>Vi har flyttet tilretteleggingsbehovene</Element... | navikt/finn-kandidat | src/pages/forside/tilretteleggingsbehov-flyttet-info/TilretteleggingsbehovFlyttetInfo.tsx | TypeScript |
ArrowFunction |
(value: any): string => {
if (value === null) return 'null';
if (value === undefined) return 'undefined';
if (typeof value === 'number') return '' + value;
if (typeof value === 'boolean') return '' + value;
if (typeof value === 'string') return `'${value.replace("'", "\\'")}'`;
if (typeof value === 'bigint... | yanokunpei/sassat | src/generator/ts/tsValueString.ts | TypeScript |
ArrowFunction |
([key, value]) => [key, tsValueString(value)] | yanokunpei/sassat | src/generator/ts/tsValueString.ts | TypeScript |
ArrowFunction |
([key, value]) => `${key}: ${value}` | yanokunpei/sassat | src/generator/ts/tsValueString.ts | TypeScript |
FunctionDeclaration |
export function makeTimeframeDayOfMonth(item: {
sql_timestamp: string;
connection: api.ProjectConnectionEnum;
}) {
let sql;
if (item.connection === api.ProjectConnectionEnum.BigQuery) {
sql = `EXTRACT(DAY FROM ${item.sql_timestamp})`;
} else if (item.connection === api.ProjectConnectionEnum.PostgreSQL) ... | rc-ontruck/mprove | blockml/src/models/gen/make-timeframe-day-of-month.ts | TypeScript |
ClassDeclaration |
export class Message {
constructor(
private readonly _name: string,
private readonly _email: Email,
private readonly _message: string
) {}
get name(): string {
return this._name;
}
get email(): string {
return this._email.value;
}
get message(): s... | AlexSamarkin/alexsamarkin.com-server | src/domain/entities/message.ts | TypeScript |
ArrowFunction |
(Vue: VueConstructor) => {
components.forEach(Component => {
Vue.use(Component);
});
} | qicainiao/gitversiondemo | src/index.ts | TypeScript |
ArrowFunction |
Component => {
Vue.use(Component);
} | qicainiao/gitversiondemo | src/index.ts | TypeScript |
InterfaceDeclaration |
interface Window {
Vue?: VueConstructor;
} | qicainiao/gitversiondemo | src/index.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [
PassportModule.register({ defaultStrategy: 'jwt' }),
JwtModule.register({
secret: process.env.JWT_SECRET || jwtConfig.secret,
signOptions: {
expiresIn: jwtConfig.expiresIn,
},
}),
TypeOrmModule.forFeature([UserRepository]),
],
controllers: [AuthContr... | loxt/nestjs-task-management | src/auth/auth.module.ts | TypeScript |
ArrowFunction |
() => {
const { query, push } = useRouter();
const configurations = useAppSelector(
getConfigurationByController(parseInt(query.controllerId as string, 10)),
);
const controller = useAppSelector(getDownloadController);
const isLoading = useAppSelector(isControllerByIdLoading);
const dispatch = useAppDi... | navelpluisje/csi-stash | src/pages/controllers/[controllerId]/index.tsx | TypeScript |
ArrowFunction |
() => {
if (query.controllerId) {
dispatch(fetchControllerById(parseInt(query.controllerId as string, 10)));
dispatch(fetchConfigurationsByController(parseInt(query.controllerId as string, 10)));
}
} | navelpluisje/csi-stash | src/pages/controllers/[controllerId]/index.tsx | TypeScript |
ArrowFunction |
(configId: number) => {
dispatch(addConfiguration(configId));
push(`/controllers/${query.controllerId}/${configId}`);
} | navelpluisje/csi-stash | src/pages/controllers/[controllerId]/index.tsx | TypeScript |
FunctionDeclaration |
export default function groupBy2<T, K extends string | number>(list: T[], iteratee: (t: T) => K) {
const groups = new Map<K, T[]>()
for (const item of list) {
const key = iteratee(item)
if (!groups.has(key)) {
groups.set(key, [])
}
groups.get(key).push(item)
}
return groups
} | GZ315200/ali-react-table | packages/ali-react-table/src/utils/groupBy2.ts | TypeScript |
ArrowFunction |
() => {
const { installed, connect } = useWallet()
const contents = !installed
? {
action: (
<ExtLink href={EXTENSION}>{MESSAGE.Wallet.DownloadExtension}</ExtLink> | Terra-pool/terra-pool-ui | src/containers/ConnectionRequired.tsx | TypeScript |
ClassDeclaration |
export class FakeState<T> implements State<T> {
private data?: T;
constructor(
private readonly empty: T,
) {
}
public async get(): Promise<T> {
if (!this.data) {
return this.empty;
}
return deepMergeObject(this.empty, this.data);
}
public asyn... | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
ClassDeclaration |
export class FakeKeyValueState<T> implements KeyValueState<T> {
private data: Record<string, T> = {};
public async getAll(): Promise<Record<string, T>> {
return this.data;
}
public async get(key: string): Promise<T | undefined> {
return this.data[key];
}
public async store(ke... | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
MethodDeclaration |
public async get(): Promise<T> {
if (!this.data) {
return this.empty;
}
return deepMergeObject(this.empty, this.data);
} | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
MethodDeclaration |
public async store(data: T): Promise<void> {
this.data = data;
} | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
MethodDeclaration |
public async getAll(): Promise<Record<string, T>> {
return this.data;
} | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
MethodDeclaration |
public async get(key: string): Promise<T | undefined> {
return this.data[key];
} | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
MethodDeclaration |
public async store(key: string, data: T): Promise<void> {
this.data[key] = data;
} | schrodit/gardener-helm-installation | src/ts/state/FakeState.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'mesh-schema-label',
templateUrl: './schema-label.component.html',
styleUrls: ['./schema-label.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SchemaLabelComponent {
@Input() schema: SchemaReference | Schema | undefined;
getSchemaName(): string {
... | darioseidl/mesh-ui | src/app/shared/components/schema-label/schema-label.component.ts | TypeScript |
MethodDeclaration |
getSchemaName(): string {
if (!this.schema) {
return '';
}
return this.schema.name || this.schema.uuid;
} | darioseidl/mesh-ui | src/app/shared/components/schema-label/schema-label.component.ts | TypeScript |
ClassDeclaration |
export default class extends Inhibitor {
async run(msg: KlasaMessage) {
if (!msg.guild) return;
if (msg.guild.settings.get(GuildSettings.StaffOnlyChannels).includes(msg.channel.id)) {
const hasPerm = await msg.hasAtLeastPermissionLevel(6);
if (!hasPerm) throw true;
}
}
} | BrandonEnglish848/oldschoolbot | src/inhibitors/onlyStaffCanUseCommands.ts | TypeScript |
MethodDeclaration |
async run(msg: KlasaMessage) {
if (!msg.guild) return;
if (msg.guild.settings.get(GuildSettings.StaffOnlyChannels).includes(msg.channel.id)) {
const hasPerm = await msg.hasAtLeastPermissionLevel(6);
if (!hasPerm) throw true;
}
} | BrandonEnglish848/oldschoolbot | src/inhibitors/onlyStaffCanUseCommands.ts | TypeScript |
ArrowFunction |
() => Sizes | abrambagus/ReactNative-Fashion-BE | src/product/models/dto/product-update.dto.ts | TypeScript |
ClassDeclaration |
class Sizes {
@IsOptional()
name?: string;
} | abrambagus/ReactNative-Fashion-BE | src/product/models/dto/product-update.dto.ts | TypeScript |
ClassDeclaration |
export class ProductUpdateDto {
@IsOptional()
@IsString()
name?: string;
@IsOptional()
@IsString()
brand?: string;
@IsOptional()
@IsString()
description?: string;
@IsOptional()
@IsInt()
price?: number;
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => Sizes)
siz... | abrambagus/ReactNative-Fashion-BE | src/product/models/dto/product-update.dto.ts | TypeScript |
ArrowFunction |
() => {
let occConfiguratorUpdateCartEntrySerializer: OccConfiguratorTextfieldUpdateCartEntrySerializer;
const USER_ID = 'theUser';
const CART_ID = '98876';
const LABEL1 = 'LABEL1';
const VALUE1 = 'VALUE1';
const TEXTFIELD = 'TEXTFIELD';
const CART_ENTRY_NUMBER = '2';
const configuration: Configurato... | Changsuwan/spartacus | feature-libs/product-configurator/textfield/occ/converters/occ-configurator-textfield-update-cart-entry-serializer.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.configureTestingModule({
providers: [OccConfiguratorTextfieldUpdateCartEntrySerializer],
});
occConfiguratorUpdateCartEntrySerializer = TestBed.inject(
OccConfiguratorTextfieldUpdateCartEntrySerializer as Type<
OccConfiguratorTextfieldUpdateCartEntrySerializer
>
... | Changsuwan/spartacus | feature-libs/product-configurator/textfield/occ/converters/occ-configurator-textfield-update-cart-entry-serializer.spec.ts | TypeScript |
ArrowFunction |
() => {
const convertedParameters = occConfiguratorUpdateCartEntrySerializer.convert(
sourceParameters
);
expect(convertedParameters.userId).toEqual(sourceParameters.userId);
expect(convertedParameters.configurationInfos[0].configuratorType).toEqual(
TEXTFIELD
);
expect(
conve... | Changsuwan/spartacus | feature-libs/product-configurator/textfield/occ/converters/occ-configurator-textfield-update-cart-entry-serializer.spec.ts | TypeScript |
ArrowFunction |
() => {
const doc = $$.dom.createDocument('myns', 'root')
if (!doc.documentElement)
throw new Error("documentElement is null")
const node1 = doc.createTextNode('data')
const node2 = doc.createTextNode('data')
doc.documentElement.appendChild(node1)
doc.documentElement.appendChild(node2)
test('cons... | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
expect(node1.data).toBe('data')
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
expect(node1.isEqualNode(node2)).toBe(true)
expect(node1.isEqualNode()).toBe(false)
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
expect(node1.nodeValue).toBe('data')
expect(node1.textContent).toBe('data')
expect(node1.data).toBe('data')
node1.nodeValue = 'new data'
expect(node1.nodeValue).toBe('new data')
expect(node1.textContent).toBe('new data')
expect(node1.data).toBe('new data')
node1.textContent = 'o... | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
expect(node1.length).toBe(4)
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
node1.appendData(' or data')
expect(node1.data).toBe('data or data')
node1.data = 'data'
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
node1.insertData(2, 'da')
expect(node1.data).toBe('dadata')
node1.data = 'data'
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
node1.data = 'a long night'
node1.deleteData(2, 5)
expect(node1.data).toBe('a night')
expect(() => node1.deleteData(20, 1)).toThrow()
node1.deleteData(1, 60)
expect(node1.data).toBe('a')
node1.data = 'data'
} | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => node1.deleteData(20, 1) | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
ArrowFunction |
() => {
const range = new $$.Range()
node1.data = 'aaxxxaa'
range.setStart(node1, 1)
range.setEnd(node1, 4)
node1.deleteData(2, 3)
expect(node1.data).toBe('aaaa')
expect(range.startOffset).toBe(1)
expect(range.endOffset).toBe(2)
node1.data = 'aaxxxaa'
range.setStart(node1, 3)
... | oozcitak/dom | test/dom/CharacterData.test.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.