type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
InterfaceDeclaration |
export interface OrderRefund_orderRefund_order_invoices {
__typename: "Invoice";
id: string;
number: string | null;
createdAt: any;
url: string | null;
status: JobStatusEnum;
} | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
InterfaceDeclaration |
export interface OrderRefund_orderRefund_order_channel {
__typename: "Channel";
isActive: boolean;
id: string;
name: string;
currencyCode: string;
} | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
InterfaceDeclaration |
export interface OrderRefund_orderRefund_order {
__typename: "Order";
id: string;
metadata: (OrderRefund_orderRefund_order_metadata | null)[];
privateMetadata: (OrderRefund_orderRefund_order_privateMetadata | null)[];
billingAddress: OrderRefund_orderRefund_order_billingAddress | null;
canFinalize: boolean... | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
InterfaceDeclaration |
export interface OrderRefund_orderRefund {
__typename: "OrderRefund";
errors: OrderRefund_orderRefund_errors[];
order: OrderRefund_orderRefund_order | null;
} | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
InterfaceDeclaration |
export interface OrderRefund {
orderRefund: OrderRefund_orderRefund | null;
} | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
InterfaceDeclaration |
export interface OrderRefundVariables {
id: string;
amount: any;
} | 7879-investment/saleor-dashboard-fork | src/orders/types/OrderRefund.ts | TypeScript |
ArrowFunction |
(p: Person) => `${p.first_name} ${p.last_name}` | 28JayG/engineering-test | front-end/src/shared/models/person.ts | TypeScript |
InterfaceDeclaration |
export interface Person {
id: number
first_name: string
last_name: string
photo_url?: string
} | 28JayG/engineering-test | front-end/src/shared/models/person.ts | TypeScript |
FunctionDeclaration | /**
* Returns an Observable that emits random integer numbers generated using Math.random. The values are generated
* between the passed `min` and `max` range.
*
* @category Random Numbers
*
* @param min The minimum value to create a random number between. Default is `0`.
* @param max The maximum value to create... | rxjs-ninja/rxjs-ninja | libs/rxjs/random/src/lib/from-random-integer.ts | TypeScript |
ArrowFunction |
(subscriber: Subscriber<number>) => {
timer(0, emitDelay)
.pipe(
takeWhile(() => !subscriber.closed),
map(() => Math.floor(Math.random() * (max - min + 1) + min)),
tap((value) => subscriber.next(value)),
)
.subscribe();
} | rxjs-ninja/rxjs-ninja | libs/rxjs/random/src/lib/from-random-integer.ts | TypeScript |
ArrowFunction |
() => !subscriber.closed | rxjs-ninja/rxjs-ninja | libs/rxjs/random/src/lib/from-random-integer.ts | TypeScript |
ArrowFunction |
() => Math.floor(Math.random() * (max - min + 1) + min) | rxjs-ninja/rxjs-ninja | libs/rxjs/random/src/lib/from-random-integer.ts | TypeScript |
ArrowFunction |
(value) => subscriber.next(value) | rxjs-ninja/rxjs-ninja | libs/rxjs/random/src/lib/from-random-integer.ts | TypeScript |
ArrowFunction |
request => original.apply(this, [request, parent, isMain]) | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
ArrowFunction |
(...args) => {
if ((args as unknown[]).length === 0 || !args[0] || args[0].type !== '__$console') {
return nativeProcessSend.apply(process, args);
}
mainThreadConsole.$logExtensionHostMessage(args[0]);
return false;
} | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
ClassDeclaration |
class NodeModuleRequireInterceptor extends RequireInterceptor {
protected _installInterceptor(): void {
const that = this;
const node_module = <any>require.__$__nodeRequire('module');
const original = node_module._load;
node_module._load = function load(request: string, parent: { filename: string; }, isMain:... | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
ClassDeclaration |
export class ExtHostExtensionService extends AbstractExtHostExtensionService {
protected async _beforeAlmostReadyToRunExtensions(): Promise<void> {
// initialize API and register actors
const extensionApiFactory = this._instaService.invokeFunction(createApiFactoryAndRegisterActors);
// Register Download comma... | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
MethodDeclaration |
protected _installInterceptor(): void {
const that = this;
const node_module = <any>require.__$__nodeRequire('module');
const original = node_module._load;
node_module._load = function load(request: string, parent: { filename: string; }, isMain: any) {
for (let alternativeModuleName of that._alternatives) {... | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
MethodDeclaration |
protected async _beforeAlmostReadyToRunExtensions(): Promise<void> {
// initialize API and register actors
const extensionApiFactory = this._instaService.invokeFunction(createApiFactoryAndRegisterActors);
// Register Download command
this._instaService.createInstance(ExtHostDownloadService);
// Register CL... | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
MethodDeclaration |
protected _loadCommonJSModule<T>(module: URI, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
if (module.scheme !== Schemas.file) {
throw new Error(`Cannot load URI: '${module}', must be of file-scheme`);
}
let r: T | null = null;
activationTimesBuilder.codeLoadingStart();
this._log... | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
MethodDeclaration |
public async $setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
if (!this._initData.remote.isRemote) {
return;
}
for (const key in env) {
const value = env[key];
if (value === null) {
delete process.env[key];
} else {
process.env[key] = value;
}
}
} | BurtHarris/vscode | src/vs/workbench/api/node/extHostExtensionService.ts | TypeScript |
ArrowFunction |
() => {
it("should deserialize to git material", () => {
const materialJSON = TestData.git();
const scmAttributesJSON = materialJSON.attributes as ScmAttributesJSON;
const material = Material.fromJSON(materialJSON);
const materialAttributes = material.attributes() as ScmMaterialAttr... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.git();
const scmAttributesJSON = materialJSON.attributes as ScmAttributesJSON;
const material = Material.fromJSON(materialJSON);
const materialAttributes = material.attributes() as ScmMaterialAttributes;
expect(material.type()).toEqual("git");... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.svn();
const attributesJSON = materialJSON.attributes as ScmAttributesJSON;
const material = Material.fromJSON(materialJSON);
const materialAttributes = material.attributes() as ScmMaterialAttributes;
expect(material.type()).toEqual("svn");... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.hg();
const attributesJSON = materialJSON.attributes as ScmAttributesJSON;
const material = Material.fromJSON(materialJSON);
const materialAttributes = material.attributes() as ScmMaterialAttributes;
expect(material.type()).toEqual("hg");
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.git();
const attributesJSON = materialJSON.attributes as ScmAttributesJSON;
// @ts-ignore
delete attributesJSON.url;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
expect(material.attributes().... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
it("should validate presence of view", () => {
const materialJSON = TestData.p4();
const attributesJSON = materialJSON.attributes as P4MaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.view;
const material = Material.fromJSON(materialJSON);
expect(material.... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.p4();
const attributesJSON = materialJSON.attributes as P4MaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.view;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
expect(m... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.p4();
const attributesJSON = materialJSON.attributes as P4MaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.port;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
expect(m... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
it("should validate presence of projectPath", () => {
const materialJSON = TestData.tfs();
const attributesJSON = materialJSON.attributes as TfsMaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.project_path;
const material = Material.fromJSON(materialJSON);
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.tfs();
const attributesJSON = materialJSON.attributes as TfsMaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.project_path;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.tfs();
const attributesJSON = materialJSON.attributes as TfsMaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.username;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
ex... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const materialJSON = TestData.tfs();
const attributesJSON = materialJSON.attributes as TfsMaterialAttributesJSON;
// @ts-ignore
delete attributesJSON.password;
const material = Material.fromJSON(materialJSON);
expect(material.attributes().isValid()).toBe(false);
ex... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
() => {
const filter = new Filter([]);
expect(filter.toJSON()).toBeNull();
filter.ignore(['abc', 'xyz']);
expect(filter.toJSON()).toEqual({ignore: ['abc', 'xyz']});
} | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ClassDeclaration |
class TestData {
static p4(): MaterialJSON {
return {
type: "p4",
attributes: {
url: "foo/bar",
destination: "bar",
filter: {
ignore: []
},
invert_filter: false,
name: "Dummy git",
auto_update: true,
view: "some-view",
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
MethodDeclaration |
static p4(): MaterialJSON {
return {
type: "p4",
attributes: {
url: "foo/bar",
destination: "bar",
filter: {
ignore: []
},
invert_filter: false,
name: "Dummy git",
auto_update: true,
view: "some-view",
port: "some-port"
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
MethodDeclaration |
static tfs(): MaterialJSON {
return {
type: "tfs",
attributes: {
url: "foo/bar",
destination: "bar",
filter: {
ignore: []
},
invert_filter: false,
name: "Dummy git",
auto_update: true,
domain: "foo.com",
project_path: "/v... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
MethodDeclaration |
static git(): MaterialJSON {
return {
type: "git",
attributes: {
url: "foo/bar",
destination: "bar",
filter: {
ignore: []
},
invert_filter: false,
name: "Dummy git",
auto_update: true,
branch: "master",
submodule_folder: ... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
MethodDeclaration |
static svn() {
return {
type: "svn",
attributes: {
url: "url",
destination: "svnDir",
filter: {
ignore: [
"*.doc"
]
},
invert_filter: false,
name: "SvnMaterial",
auto_update: true,
check_externals: true,
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
MethodDeclaration |
static hg() {
return JSON.parse(
JSON.stringify({
type: "hg",
attributes: {
url: "hg-url",
destination: "foo_bar",
filter: {
ignore: []
... | FFHixio/gocd | server/src/main/webapp/WEB-INF/rails/webpack/models/maintenance_mode/spec/material_spec.ts | TypeScript |
ArrowFunction |
(ref: HTMLDivElement | null) => (this.contentDiv = ref) | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({ isPopoverOpen: true });
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({ isPopoverOpen: false });
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
ClassDeclaration |
export class TruncatedFormat extends React.PureComponent<ITruncatedFormatProps, ITruncatedFormatState> {
public static displayName = `${DISPLAYNAME_PREFIX}.TruncatedFormat`;
public static defaultProps: ITruncatedFormatProps = {
detectTruncation: false,
measureByApproxOptions: {
app... | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
InterfaceDeclaration |
export interface ITrucatedFormateMeasureByApproximateOptions {
/**
* Approximate character width (in pixels), used to determine whether to display the popover in approx truncation mode.
* The default value should work for normal table styles,
* but should be changed as necessary if the fonts or styl... | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
InterfaceDeclaration |
export interface ITruncatedFormatProps extends Props {
children?: string;
/**
* Should the component keep track of the truncation state of the string content. If true, the
* value of `truncateLength` is ignored. When combined with a `showPopover` value of
* `WHEN_TRUNCATED`, popovers will only ... | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
InterfaceDeclaration |
export interface ITruncatedFormatState {
isTruncated?: boolean;
isPopoverOpen?: boolean;
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
EnumDeclaration |
export enum TruncatedPopoverMode {
ALWAYS = "always",
NEVER = "never",
WHEN_TRUNCATED = "when-truncated",
WHEN_TRUNCATED_APPROX = "when-truncated-approx",
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
TypeAliasDeclaration |
export type TruncatedFormatProps = ITruncatedFormatProps; | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
MethodDeclaration |
public componentDidMount() {
this.setTruncationState();
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
MethodDeclaration |
public componentDidUpdate() {
this.setTruncationState();
} | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
MethodDeclaration |
public render() {
const { children, detectTruncation, truncateLength, truncationSuffix } = this.props;
const content = "" + children;
let cellContent = content;
if (!detectTruncation && truncateLength! > 0 && cellContent.length > truncateLength!) {
cellContent = cellContent... | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
MethodDeclaration |
private renderPopover() {
const { children, preformatted } = this.props;
// `<Popover>` will always check the content's position on update
// regardless if it is open or not. This negatively affects perf due to
// layout thrashing. So instead we manage the popover state ourselves
... | mattskrobola/blueprint | packages/table/src/cell/formats/truncatedFormat.tsx | TypeScript |
ArrowFunction |
async () => {
const presenceData: PresenceData = {
largeImageKey: "pylon"
},
docsSelector =
".current.tsd-kind-namespace > a, .current.tsd-parent-kind-namespace > a";
if (document.location.pathname.startsWith("/docs/changelog"))
presenceData.details = "Viewing the changelog";
else if (do... | AirborneRadio/Presences | websites/P/Pylon/presence.ts | TypeScript |
ArrowFunction |
(key) => {
if (currentFile.textContent.endsWith(key)) return true;
const match = /^\/(.*)\/([mgiy]+)$/.exec(key);
if (!match) return false;
const regex = new RegExp(match[1], match[2]);
return regex.test(currentFile.textContent);
} | AirborneRadio/Presences | websites/P/Pylon/presence.ts | TypeScript |
ArrowFunction |
(fill?: string): string => `
height: 16px;
width: 16px;
fill: ${fill};
opacity: 0.5;
${hoverTransition};
&:hover {
cursor: pointer;
fill: ${fill};
opacity: 1;
}
` | cheersmas/react-upload-box | src/styles/components/Buttons/Common.tsx | TypeScript |
ArrowFunction |
(predefinito: | BcashNetwork/Bcash | src/qt/locale/bitcoin_it.ts | TypeScript |
ArrowFunction |
(): void => {
let store: Store<IState>;
// this is basically resets store's state, because of "KARMA_RESET" reducer.
beforeEach(() => {
store = configureStore();
});
// default language is setted in localizationService
i... | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
() => {
store = configureStore();
} | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
(): void => {
expect(store.getState().language).toBe("");
} | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
(): void => {
store.dispatch(changeLanguage("ru"));
expect(store.getState().language).toBe("ru");
// we don't really check that it's valid lanaguge
store.dispatch(changeLanguage("xuz"));
expect(store.getState().language).toBe("xuz")... | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
(
done: () => void
): void => {
const language = "ua";
spyOn(window.localStorage, "setItem").and.callFake((key: string, persistedData: string ): void => {
// Check if routing was called with correct params
expect(... | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
(key: string, persistedData: string ): void => {
// Check if routing was called with correct params
expect(JSON.parse(persistedData).language).toBe(language);
done();
} | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ClassDeclaration | //This tests has side effects affects, for some reason it influences Server.tsx
class LanguageReducer extends TestBase {
public runTests(): void {
describe("Test Language reducer", (): void => {
let store: Store<IState>;
// this is basically resets store's state, because of "KA... | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
MethodDeclaration |
public runTests(): void {
describe("Test Language reducer", (): void => {
let store: Store<IState>;
// this is basically resets store's state, because of "KARMA_RESET" reducer.
beforeEach(() => {
store = configureStore();
});
... | RWS/dxa-modules | gui/test/tests/store/reducers/Language.ts | TypeScript |
ArrowFunction |
(props) => {
const { output, onSelect, isSelected, baseTokenName } = props;
return (
<Tr
onClick={onSelect}
bgColor={isSelected ? "main.primary" : "inherit"}
color={isSelected ? "text.secondary" : "text.primary"}
cursor="pointer"
_hover={{
bgColor: isSelected ? "main.prim... | Component-fi/YieldTokenCompounding | frontend/src/components/Pages/YTC/Table/ResultsTableRow.tsx | TypeScript |
InterfaceDeclaration |
interface ResultsTableRowInterface {
baseTokenName: string;
output: YTCOutput;
onSelect: () => void;
isSelected: boolean;
} | Component-fi/YieldTokenCompounding | frontend/src/components/Pages/YTC/Table/ResultsTableRow.tsx | TypeScript |
MethodDeclaration |
shortenNumber(output | Component-fi/YieldTokenCompounding | frontend/src/components/Pages/YTC/Table/ResultsTableRow.tsx | TypeScript |
ArrowFunction |
() => {
beforeEach(function() {
ctx.variable = new CustomVariable({}, {});
});
describe('and value is a string', () => {
it('should return an unquoted value', () => {
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql('abc');
});
});
describe('and value is a ... | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
it('should return an unquoted value', () => {
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql('abc');
});
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql('abc');
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
it('should return an unquoted value', () => {
expect(ctx.ds.interpolateVariable(1000, ctx.variable)).to.eql(1000);
});
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
expect(ctx.ds.interpolateVariable(1000, ctx.variable)).to.eql(1000);
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
it('should return comma separated quoted values', () => {
expect(ctx.ds.interpolateVariable(['a', 'b', 'c'], ctx.variable)).to.eql("'a','b','c'");
});
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
expect(ctx.ds.interpolateVariable(['a', 'b', 'c'], ctx.variable)).to.eql("'a','b','c'");
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
it('should return a quoted value', () => {
ctx.variable.multi = true;
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql("'abc'");
});
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
ctx.variable.multi = true;
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql("'abc'");
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
it('should return a quoted value', () => {
ctx.variable.includeAll = true;
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql("'abc'");
});
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ArrowFunction |
() => {
ctx.variable.includeAll = true;
expect(ctx.ds.interpolateVariable('abc', ctx.variable)).to.eql("'abc'");
} | Team-Honglou/testgit | public/app/plugins/datasource/mysql/specs/datasource_specs.ts | TypeScript |
ClassDeclaration |
@inject('mobileMenuStore')
@observer
export class Header extends React.Component<IProps> {
// eslint-disable-next-line
constructor(props: any) {
super(props)
}
get injected() {
return this.props as IInjectedProps
}
render() {
const menu = this.injected.mobileMenuStore
return (
<>
... | Daniel-Davies/community-platform | src/pages/common/Header/Header.tsx | TypeScript |
InterfaceDeclaration |
interface IInjectedProps extends IProps {
mobileMenuStore: MobileMenuStore
} | Daniel-Davies/community-platform | src/pages/common/Header/Header.tsx | TypeScript |
MethodDeclaration |
render() {
const menu = this.injected.mobileMenuStore
return (
<>
<Flex
data-cy="header"
bg="white"
justifyContent="space-between"
alignItems="center"
pl={[4, 4, 0]}
pr={[4, 4, 0]}
sx={{ zIndex: theme.zIndex.header, position: '... | Daniel-Davies/community-platform | src/pages/common/Header/Header.tsx | TypeScript |
ArrowFunction |
() => ExtPivotrangeeditorComponent | cbaque/ext-angular | packages/ext-angular/lib/ext-pivotrangeeditor.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'ext-pivotrangeeditor',
inputs: pivotrangeeditorMetaData.PROPERTIES,
outputs: pivotrangeeditorMetaData.EVENTNAMES,
providers: [{provide: EngBase, useExisting: forwardRef(() => ExtPivotrangeeditorComponent)}],
template: '<ng-template></ng-template>'
})
export class ExtPivotrangeeditorCo... | cbaque/ext-angular | packages/ext-angular/lib/ext-pivotrangeeditor.component.ts | TypeScript |
MethodDeclaration |
public ngOnInit() {
this.baseOnInit(pivotrangeeditorMetaData)
} | cbaque/ext-angular | packages/ext-angular/lib/ext-pivotrangeeditor.component.ts | TypeScript |
MethodDeclaration |
public ngAfterViewInit() {
this.baseAfterViewInit(pivotrangeeditorMetaData)
} | cbaque/ext-angular | packages/ext-angular/lib/ext-pivotrangeeditor.component.ts | TypeScript |
MethodDeclaration | //public ngAfterContentInit() {
// this.baseAfterContentInit()
//}
public ngOnChanges(changes: SimpleChanges) {this.baseOnChanges(changes)} | cbaque/ext-angular | packages/ext-angular/lib/ext-pivotrangeeditor.component.ts | TypeScript |
FunctionDeclaration |
export function isBroadcastTxFailure(result: BroadcastTxResult): result is BroadcastTxFailure {
return !!(result as BroadcastTxFailure).code;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration |
export function isBroadcastTxSuccess(result: BroadcastTxResult): result is BroadcastTxSuccess {
return !isBroadcastTxFailure(result);
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration | /**
* Ensures the given result is a success. Throws a detailed error message otherwise.
*/
export function assertIsBroadcastTxSuccess(result: BroadcastTxResult): asserts result is BroadcastTxSuccess {
if (isBroadcastTxFailure(result)) {
throw new Error(
`Error when broadcasting tx ${result.transactionHash... | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration |
export function isSearchByHeightQuery(query: SearchTxQuery): query is SearchByHeightQuery {
return (query as SearchByHeightQuery).height !== undefined;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration |
export function isSearchBySentFromOrToQuery(query: SearchTxQuery): query is SearchBySentFromOrToQuery {
return (query as SearchBySentFromOrToQuery).sentFromOrTo !== undefined;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration |
export function isSearchByTagsQuery(query: SearchTxQuery): query is SearchByTagsQuery {
return (query as SearchByTagsQuery).tags !== undefined;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
FunctionDeclaration |
function withFilters(originalQuery: string): string {
return `${originalQuery}&tx.minheight=${minHeight}&tx.maxheight=${maxHeight}`;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
ArrowFunction |
(t) => t.hash | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
ArrowFunction |
(t) => !sentHashes.includes(t.hash) | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
ArrowFunction |
(t) => `${t.key}=${t.value}` | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
ArrowFunction |
(tx) => tx.height >= minHeight && tx.height <= maxHeight | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
ArrowFunction |
(restItem): IndexedTx => ({
height: parseInt(restItem.height, 10),
hash: restItem.txhash,
code: restItem.code || 0,
rawLog: restItem.raw_log,
logs: parseLogs(restItem.logs || []),
tx: restItem.tx,
timestamp: restItem.timestamp,
}) | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
InterfaceDeclaration |
export interface GetSequenceResult {
readonly accountNumber: number;
readonly sequence: number;
} | public-awesome/cosmjs | packages/launchpad/src/cosmosclient.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.