type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
videoReady() {
this._ready = true;
this.ready.emit(true);
this.loading = false;
this.length = this._player.duration;
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
videoEnded() {
this.playing = false;
this._ended = true;
this.percentPlayed = 100;
this.ended.emit(true);
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
playerWaiting() {
this.resumed.emit(false);
this.playing = false;
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
playbackResumed() {
this.resumed.emit(true);
this._cancelProgress();
this._progressSub = timer(0, 50)
.pipe(
takeWhile(_ => !this._ended)
).subscribe(
_ => {
this.currTime = this.getCurrentTime();
this.percentPlayed = Math.... | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration | // Host-only controls
startVideo() {
this.starting = true;
this.hostStart.emit(this.video);
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
stopVideo() {
this.stopping = true;
this.hostStop.emit(this.video);
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
selectVideo() {
this.hostSelect.emit(this.video);
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
MethodDeclaration |
private _cancelProgress() {
if (this._progressSub) {
try {
this._progressSub.unsubscribe();
this._progressSub = null;
} catch (e) {
// do nothing
}
}
} | swimmadude66/movienight | src/client/components/player/component.ts | TypeScript |
InterfaceDeclaration | /**
* @description This plugin generates React Apollo components and HOC with TypeScript typings.
*
* It extends the basic TypeScript plugins: `@graphql-codegen/typescript`, `@graphql-codegen/typescript-operations` - and thus shares a similar configuration.
*/
export interface ReactApolloRawPluginConfig extends Raw... | B2o5T/graphql-code-generator | packages/plugins/typescript/react-apollo/src/config.ts | TypeScript |
ArrowFunction |
(response) => response.status === 200 | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
ArrowFunction |
(client) => client.health() | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
ArrowFunction |
(client) => client.executeScript(script, funcs, hasMutation, opts) | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
ClassDeclaration |
export abstract class PixieAPIClientAbstract {
static readonly DEFAULT_OPTIONS: Required<PixieAPIClientOptions>;
readonly options: Required<PixieAPIClientOptions>;
abstract health(cluster: string | ClusterConfig): Observable<Status>;
abstract executeScript(
cluster: string | ClusterConfig,
script: s... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
ClassDeclaration | /**
* API client library for [Pixie](https://px.dev).
* See the [documentation](https://docs.px.dev/reference/api/overview/) for a complete reference.
*/
export class PixieAPIClient extends PixieAPIClientAbstract {
/**
* By default, a new Pixie API Client assumes a matching origin between the UI and API, that a... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
InterfaceDeclaration | /**
* When calling `PixieAPIClient.create`, this specifies which clusters to connect to, and any special configuration for
* each of those connections as needed.
*/
export interface ClusterConfig {
id: string;
/**
* If provided, this overrides the endpoint for connections to the GRPC API on a cluster.
* Th... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration |
abstract health(cluster: string | ClusterConfig): Observable<Status>; | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration |
abstract executeScript(
cluster: string | ClusterConfig,
script: string,
opts: ExecuteScriptOptions,
funcs?: VizierQueryFunc[],
): Observable<ExecutionStateUpdate>; | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration |
abstract isAuthenticated(): Promise<boolean>; | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | /**
* Builds an API client to speak to Pixie's gRPC and GraphQL backends. The former connects to specific clusters;
* the latter connects to Pixie Cloud.
*
* @param options Set these to change the client's behavior or to listen for authorization errors.
*/
static async create(
options: PixieAPIClient... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration |
private async init(): Promise<PixieAPIClient> {
this.gqlClient = new CloudClient(this.options);
await this.gqlClient.getGraphQLPersist();
this.clusterConnections = new Map();
return this;
} | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | // Note: this doesn't check if the client already exists, and clobbers any existing client.
private async createVizierClient(cluster: ClusterConfig) {
const { ipAddress, token } = await this.gqlClient.getClusterConnection(cluster.id, true);
const client = new VizierGRPCClient(
cluster.passthroughClusterAd... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration |
private async getClusterClient(cluster: string | ClusterConfig) {
let id: string;
let passthroughClusterAddress: string;
let attachCredentials = false;
if (typeof cluster === 'string') {
id = cluster;
} else {
({ id, passthroughClusterAddress, attachCredentials } = cluster);
}
... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | // TODO(nick): Once the authentication model settles down, make this easier to use outside of the browser.
/**
* Checks whether the current cookies include a valid authentication token.
* Checks by querying a purpose-built endpoint, to be certain the user really is authenticated.
*/
isAuthenticated(): Promise<... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | /**
* Creates a stream that listens for the health of the cluster and the API client's connection to it.
* This is an Observable, so don't forget to unsubscribe when you're done with it.
* @param cluster Which cluster to use. Either just its ID, or a full config. If that cluster has previously been
* ... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | /**
* Asks a connected cluster to run a PxL script. Returns an event stream that updates at each stage of execution.
*
* A typical event stream might look something like this:
* - start
* - metadata
* - mutation info (if the script uses tracepoints)
* - data
* - stats
*
* @param cluster Wh... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
MethodDeclaration | /**
* Implementation detail for adapters.
* Do not use directly unless writing such an adapter.
*
* Provides the internal CloudClient, which has a graphQL property.
* That property is an ApolloClient, with which GraphQL queries can be run directly.
*
* @internal
*/
getCloudClient(): CloudClient ... | Mu-L/pixie | src/ui/src/api/api.ts | TypeScript |
ArrowFunction |
() => {
describe('VDomModel', () => {
describe('#constructor()', () => {
it('should create a VDomModel', () => {
const model = new VDomModel();
expect(model).to.be.an.instanceof(VDomModel);
});
it('should create a TestModel', () => {
const model = new TestModel();
... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
describe('#constructor()', () => {
it('should create a VDomModel', () => {
const model = new VDomModel();
expect(model).to.be.an.instanceof(VDomModel);
});
it('should create a TestModel', () => {
const model = new TestModel();
expect(model).to.be.an.instan... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should create a VDomModel', () => {
const model = new VDomModel();
expect(model).to.be.an.instanceof(VDomModel);
});
it('should create a TestModel', () => {
const model = new TestModel();
expect(model).to.be.an.instanceof(TestModel);
});
it('s... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const model = new VDomModel();
expect(model).to.be.an.instanceof(VDomModel);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const model = new TestModel();
expect(model).to.be.an.instanceof(TestModel);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const model = new TestModel();
model.dispose();
expect(model.isDisposed).to.be.equal(true);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should fire the stateChanged signal on a change', () => {
const model = new TestModel();
let changed = false;
model.stateChanged.connect(() => {
changed = true;
});
model.value = 'newvalue';
expect(changed).to.equal(true);
});
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const model = new TestModel();
let changed = false;
model.stateChanged.connect(() => {
changed = true;
});
model.value = 'newvalue';
expect(changed).to.equal(true);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
changed = true;
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
describe('#constructor()', () => {
it('should create a TestWidget', () => {
const widget = new TestWidget();
expect(widget).to.be.an.instanceof(TestWidget);
});
it('should be properly disposed', () => {
const widget = new TestWidget();
widget.dispose();
... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should create a TestWidget', () => {
const widget = new TestWidget();
expect(widget).to.be.an.instanceof(TestWidget);
});
it('should be properly disposed', () => {
const widget = new TestWidget();
widget.dispose();
expect(widget.isDisposed).to.equa... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const widget = new TestWidget();
expect(widget).to.be.an.instanceof(TestWidget);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const widget = new TestWidget();
widget.dispose();
expect(widget.isDisposed).to.equal(true);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should fire the stateChanged signal on a change', () => {
const widget = new TestWidget();
const model = new TestModel();
let changed = false;
widget.modelChanged.connect(() => {
changed = true;
});
widget.model = model;
expect(changed... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
const widget = new TestWidget();
const model = new TestModel();
let changed = false;
widget.modelChanged.connect(() => {
changed = true;
});
widget.model = model;
expect(changed).to.equal(true);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should render the contents after a model change', async () => {
const widget = new TestWidget();
const model = new TestModel();
widget.model = model;
model.value = 'foo';
await framePromise();
let span = widget.node.firstChild as HTMLElement;
ex... | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
async () => {
const widget = new TestWidget();
const model = new TestModel();
widget.model = model;
model.value = 'foo';
await framePromise();
let span = widget.node.firstChild as HTMLElement;
expect(span.textContent).to.equal('foo');
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should work with a null model', async () => {
const widget = new TestWidgetNoModel();
Widget.attach(widget, document.body);
await framePromise();
const span = widget.node.firstChild as HTMLElement;
expect(span.textContent).to.equal('No model!');
});
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ArrowFunction |
async () => {
const widget = new TestWidgetNoModel();
Widget.attach(widget, document.body);
await framePromise();
const span = widget.node.firstChild as HTMLElement;
expect(span.textContent).to.equal('No model!');
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ClassDeclaration |
class TestModel extends VDomModel {
get value(): string {
return this._value;
}
set value(newValue: string) {
this._value = newValue;
this.stateChanged.emit(void 0);
}
private _value = '';
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ClassDeclaration |
class TestWidget extends VDomRenderer<TestModel> {
protected render(): React.ReactElement<any> {
return React.createElement('span', null, this.model.value);
}
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
ClassDeclaration |
class TestWidgetNoModel extends VDomRenderer<null> {
protected render(): React.ReactElement<any> {
return React.createElement('span', null, 'No model!');
}
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
MethodDeclaration |
protected render(): React.ReactElement<any> {
return React.createElement('span', null, this.model.value);
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
MethodDeclaration |
protected render(): React.ReactElement<any> {
return React.createElement('span', null, 'No model!');
} | AlokTakshak/jupyterlab | tests/test-apputils/src/vdom.spec.ts | TypeScript |
FunctionDeclaration |
async function claim() {
if (isAppReady) {
try {
setClaimError(null);
setClaimTxModalOpen(true);
const contract = getContract(stakedAsset, signer);
const gasLimit = await synthetix.getGasEstimateForTransaction({
txArgs: [],
method: contract.estimateGas.getReward,
});
c... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
({
stakedAsset,
icon = stakedAsset,
type,
tokenRewards,
allowance,
userBalance,
userBalanceBN,
staked,
stakedBN,
needsToSettle,
secondTokenRate,
}) => {
const { t } = useTranslation();
const { signer } = Connector.useContainer();
const { monitorTransaction } = TransactionNotifier.useContainer();
const [... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
const commonStakeTabProps = {
stakedAsset,
userBalance,
userBalanceBN,
staked,
stakedBN,
icon,
type,
};
return [
{
title: t('earn.actions.stake.title'),
tabChildren: <StakeTab {...commonStakeTabProps} isStake={true} />,
blue: true,
key: 'stake',
},
{
tit... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
if (allowance === 0 && userBalance > 0) {
setShowApproveOverlayModal(true);
}
} | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
if (needsToSettle) {
setShowSettleOverlayModal(true);
}
} | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
async function claim() {
if (isAppReady) {
try {
setClaimError(null);
setClaimTxModalOpen(true);
const contract = getContract(stakedAsset, signer);
const gasLimit = await synthetix.getGasEstimateForTransaction({
txArgs: [],
method: contract.estimateGas.getReward,
... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => setClaimTransactionState(Transaction.SUCCESS) | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
if (stakedAsset === Synths.iETH) {
return 'earn.incentives.options.ieth.description';
} else if (stakedAsset === Synths.iBTC) {
return 'earn.incentives.options.ibtc.description';
} else if (stakedAsset === LP.CURVE_sUSD) {
return 'earn.incentives.options.curve.description';
} else if (stakedAs... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
ArrowFunction |
() => {
switch (stakedAsset) {
case LP.BALANCER_sTSLA:
return `https://pools.balancer.exchange/#/pool/0x055db9aff4311788264798356bbf3a733ae181c6/`;
case LP.BALANCER_sFB:
return `https://pools.balancer.exchange/#/pool/0x3f2d077acff8a66c4e0c79c37b6a662a7197889b/`;
case LP.BALANCER_sAAPL:
return `h... | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
TypeAliasDeclaration |
type DualRewards = {
a: number;
b: number;
}; | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
TypeAliasDeclaration |
type LPTabProps = {
stakedAsset: CurrencyKey;
icon?: CurrencyKey;
type?: CurrencyIconType;
tokenRewards: number | DualRewards;
allowance: number | null;
userBalance: number;
userBalanceBN: BigNumber;
staked: number;
stakedBN: BigNumber;
needsToSettle?: boolean;
secondTokenRate?: number;
}; | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
MethodDeclaration |
t('earn.actions.rewards.waiting') | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
MethodDeclaration |
getLink() | crypto-supporter/staking | sections/earn/LPTab/LPTab.tsx | TypeScript |
FunctionDeclaration |
async function setOneImpliedJson(
id: string,
val: unknown,
): Promise<{id: string; val: unknown}> {
const [result] = await db.query(sql`
INSERT INTO json_test.json (id, val) VALUES (${id}, ${val})
ON CONFLICT (id) DO UPDATE SET val=EXCLUDED.val
RETURNING *;
`);
return result;
... | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
FunctionDeclaration |
async function setOneExplicitJson(
id: string,
val: unknown,
): Promise<{id: string; val: unknown}> {
const [result] = await db.query(sql`
INSERT INTO json_test.json (id, val) VALUES (${id}, ${JSON.stringify(
val,
)})
ON CONFLICT (id) DO UPDATE SET val=EXCLUDED.val
RETURNING *... | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
FunctionDeclaration |
async function setMany(
...values: readonly {
readonly id: string;
readonly val: unknown;
}[]
): Promise<{id: string; val: unknown}[]> {
const results = await db.query(
values.map(
({id, val}) => sql`
INSERT INTO json_test.json (id, val)
VALUES (${id}, ${JSON... | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
await db.dispose();
} | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
const [{foo}] = await db.query(sql`SELECT 1 + 1 as foo`);
expect(foo).toBe(2);
} | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
const resultA = await db.query([sql`SELECT 1 + 1 as foo`]);
expect(resultA).toEqual([[{foo: 2}]]);
const resultB = await db.query([
sql`SELECT ${1} + 1 as foo;`,
sql`SELECT 1 + ${2} as bar;`,
]);
expect(resultB).toEqual([[{foo: 2}], [{bar: 3}]]);
} | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
const [{foo}] = await db.query(sql`SELECT 1 + ${41} as ${sql.ident('foo')}`);
expect(foo).toBe(42);
} | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
await db.query(sql`CREATE SCHEMA json_test`);
await db.query(
sql`CREATE TABLE json_test.json (id TEXT NOT NULL PRIMARY KEY, val JSONB NOT NULL);`,
);
async function setOneImpliedJson(
id: string,
val: unknown,
): Promise<{id: string; val: unknown}> {
const [result] = await db.q... | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
({id, val}) => sql`
INSERT INTO json_test.json (id, val)
VALUES (${id}, ${JSON.stringify(val)})
ON CONFLICT (id) DO UPDATE SET val=EXCLUDED.val
RETURNING *;
` | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
([{id, val}]) => ({id, val}) | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ArrowFunction |
async () => {
await db.query(sql`CREATE SCHEMA bigint_test`);
await db.query(
sql`CREATE TABLE bigint_test.bigints (id BIGINT NOT NULL PRIMARY KEY);`,
);
await db.query(sql`
INSERT INTO bigint_test.bigints (id)
VALUES (1),
(2),
(42);
`);
const result = await db.query(sql`S... | AmitMY/atdatabases | packages/pg/src/__tests__/index.test.pg.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'dialog-github-initial-setup',
templateUrl: './dialog-github-initial-setup.component.html',
styleUrls: ['./dialog-github-initial-setup.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DialogGithubInitialSetupComponent implements OnInit {
T: typeof T = ... | AlexisPrel/super-productivity | src/app/features/issue/providers/github/github-view-components/dialog-github-initial-setup/dialog-github-initial-setup.component.ts | TypeScript |
MethodDeclaration |
saveGithubCfg(gitCfg: GithubCfg): void {
this._matDialogRef.close(gitCfg);
} | AlexisPrel/super-productivity | src/app/features/issue/providers/github/github-view-components/dialog-github-initial-setup/dialog-github-initial-setup.component.ts | TypeScript |
MethodDeclaration |
close(): void {
this._matDialogRef.close();
} | AlexisPrel/super-productivity | src/app/features/issue/providers/github/github-view-components/dialog-github-initial-setup/dialog-github-initial-setup.component.ts | TypeScript |
ClassDeclaration |
export class PostgresQueryBuilder {
constructor(private target, private queryModel) {}
buildSchemaQuery() {
var query = 'SELECT schema_name FROM information_schema.schemata WHERE';
query += " schema_name NOT LIKE 'pg_%' AND schema_name NOT LIKE '\\_%' AND schema_name <> 'information_schema';";
return... | vipin-pink/grafana | public/app/plugins/datasource/postgres/query_builder.ts | TypeScript |
MethodDeclaration |
buildSchemaQuery() {
var query = 'SELECT schema_name FROM information_schema.schemata WHERE';
query += " schema_name NOT LIKE 'pg_%' AND schema_name NOT LIKE '\\_%' AND schema_name <> 'information_schema';";
return query;
} | vipin-pink/grafana | public/app/plugins/datasource/postgres/query_builder.ts | TypeScript |
MethodDeclaration |
buildTableQuery() {
var query = 'SELECT table_name FROM information_schema.tables WHERE ';
query += 'table_schema = ' + this.queryModel.quoteLiteral(this.target.schema);
return query;
} | vipin-pink/grafana | public/app/plugins/datasource/postgres/query_builder.ts | TypeScript |
MethodDeclaration |
buildColumnQuery(type?: string) {
var query = 'SELECT column_name FROM information_schema.columns WHERE ';
query += 'table_schema = ' + this.queryModel.quoteLiteral(this.target.schema);
query += ' AND table_name = ' + this.queryModel.quoteLiteral(this.target.table);
switch (type) {
case 'time': ... | vipin-pink/grafana | public/app/plugins/datasource/postgres/query_builder.ts | TypeScript |
MethodDeclaration |
buildValueQuery(column: string) {
var query = 'SELECT DISTINCT ' + this.queryModel.quoteIdentifier(column) + '::text';
query += ' FROM ' + this.queryModel.quoteIdentifier(this.target.schema);
query += '.' + this.queryModel.quoteIdentifier(this.target.table);
query += ' ORDER BY ' + this.queryModel.quot... | vipin-pink/grafana | public/app/plugins/datasource/postgres/query_builder.ts | TypeScript |
ArrowFunction |
({ children, title }) => {
const [isThemeDark, setIsThemeDark] = useThemeState(false)
return (
<>
<Global styles={NORMALIZE} />
<SEO title={title} />
<ThemeContext.Provider value={{ isThemeDark, setIsThemeDark }} | ricopella/metta_vt | src/components/Layout/index.tsx | TypeScript |
InterfaceDeclaration |
interface ILayout {
title?: string
} | ricopella/metta_vt | src/components/Layout/index.tsx | TypeScript |
ClassDeclaration | /*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... | aparo/opendistro-client-generator | specification/specs/query_dsl/compound/function_score/FunctionScoreQuery.ts | TypeScript |
ArrowFunction |
() => MoveArgs | favware/website-api | src/services/MoveService.ts | TypeScript |
ArrowFunction |
() => FuzzyMoveArgs | favware/website-api | src/services/MoveService.ts | TypeScript |
ClassDeclaration |
export class MoveService {
private static readonly fuzzySearch = new FuzzySearch(moves, ['name', 'aliases']);
public static getByMoveName(@Args(() => MoveArgs) { move }: MoveArgs): PokemonTypes.Move | undefined {
return moves.get(move);
}
public static mapMoveDataToMoveGraphQL({ data, requestedFields }: M... | favware/website-api | src/services/MoveService.ts | TypeScript |
InterfaceDeclaration |
interface MapMoveDataToMoveGraphQLParameters {
data: PokemonTypes.Move;
requestedFields: GraphQLSet<keyof Move>;
} | favware/website-api | src/services/MoveService.ts | TypeScript |
MethodDeclaration |
public static getByMoveName(@Args(() => MoveArgs) { move }: MoveArgs): PokemonTypes.Move | undefined {
return moves.get(move);
} | favware/website-api | src/services/MoveService.ts | TypeScript |
MethodDeclaration |
public static mapMoveDataToMoveGraphQL({ data, requestedFields }: MapMoveDataToMoveGraphQLParameters): Move {
const move = new Move();
addPropertyToClass(move, 'key', data.key, requestedFields);
addPropertyToClass(move, 'name', data.name, requestedFields);
addPropertyToClass(move, 'desc', data.desc, r... | favware/website-api | src/services/MoveService.ts | TypeScript |
MethodDeclaration |
public static findByFuzzy(@Args(() => FuzzyMoveArgs) { move, offset, reverse, take }: FuzzyMoveArgs): PokemonTypes.Move[] {
move = preParseInput(move);
const fuzzyResult = this.fuzzySearch.runFuzzy(move);
if (reverse) {
fuzzyResult.reverse();
}
return fuzzyResult.slice(offset, offset + tak... | favware/website-api | src/services/MoveService.ts | TypeScript |
MethodDeclaration | /**
* Converts basePower and zMovePower to the correct Z-Move power, using datamined conversion table seen below.
*
* | Base move power | Z-Move power |
* |------------------|--------------|
* | 0-55 | 100 |
* | 60-65 | 120 |
* | 70-75 | 140 ... | favware/website-api | src/services/MoveService.ts | TypeScript |
ArrowFunction |
() => {
it('should create style instructions on the element', () => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div [style]="... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div [style]="myStyleExp"></div>\`
})
export cla... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div style="opacity:1"
[attr.style]=... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div [style.background-image]="myImage">\`
})
... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
it('should create class styling instructions on the element', () => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div [... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div [class]="myClassExp"></div>\`
})
export cla... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
ArrowFunction |
() => {
const files = {
app: {
'spec.ts': `
import {Component, NgModule} from '@angular/core';
@Component({
selector: 'my-component',
template: \`<div class="grape"
[attr.class]="'ba... | DaveCheez/angular | packages/compiler-cli/test/compliance/r3_view_compiler_styling_spec.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.