type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ClassDeclaration |
export default class MenuControl extends React.Component<{
selected?: boolean,
}> {
public render() {
const { selected } = this.props;
return (
<Moveable />);
}
} | bagusindrayana/scena | packages/react-scenejs-editor/src/react-scenejs-editor/Menus/MenuControl.tsx | TypeScript |
MethodDeclaration |
public render() {
const { selected } = this.props;
return (
<Moveable />);
} | bagusindrayana/scena | packages/react-scenejs-editor/src/react-scenejs-editor/Menus/MenuControl.tsx | TypeScript |
FunctionDeclaration |
function compileWithStringify(template: string) {
return compile(template, {
hoistStatic: true,
prefixIdentifiers: true,
transformHoist: stringifyStatic
})
} | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
FunctionDeclaration |
function repeat(code: string, n: number): string {
return new Array(n)
.fill(0)
.map(() => code)
.join('')
} | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => code | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div><div>hello</div><div>hello</div></div></div>`
)
expect(ast.hoists.length).toBe(1)
// should be a normal vnode call
expect(ast.hoists[0]!.type).toBe(NodeTypes.VNODE_CALL)
} | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div>${repeat(
`<span class="foo"/>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div></div>`
)
expect(ast.hoists.length).toBe(1)
// should be optimized now
expect(ast.hoists[0]).toMatchObject({
type: NodeT... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div>${repeat(
`<span/>`,
StringifyThresholds.NODE_COUNT
)}</div></div>`
)
expect(ast.hoists.length).toBe(1)
// should be optimized now
expect(ast.hoists[0]).toMatchObject({
type: NodeTypes.JS_CALL_EXPRESSION,
... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div>${repeat(
`<span class="foo"/>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div>`
)
// should have 5 hoisted nodes, but the other 4 should be null
expect(ast.hoists.length).toBe(5)
for (let i = 1; i < 5; i++) {
... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div :style="{ color: 'red' }">${repeat(
`<span :class="[{ foo: true }, { bar: true }]">{{ 1 }} + {{ false }}</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div></div>`
)
expect(ast.hoists.length).toBe(1)
// sh... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div>${repeat(
`<span :class="'foo' + '>ar'">{{ 1 }} + {{ '<' }}</span>` +
`<span>&</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div></div>`
)
expect(ast.hoists.length).toBe(1)
// should be o... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compile(
`<div><div>${repeat(
`<span class="foo">foo</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}<img src="./foo" /></div></div>`,
{
hoistStatic: true,
prefixIdentifiers: true,
transformHoist: stringifyStatic,
n... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
node => {
if (node.type === NodeTypes.ELEMENT && node.tag === 'img') {
const exp = createSimpleExpression(
'_imports_0_',
false,
node.loc,
ConstantTypes.CAN_HOIST
)
node.props[0] = {
ty... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div><input indeterminate>${repeat(
`<span class="foo">foo</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</div></div>`
)
expect(ast.hoists.length).toBe(1)
expect(ast.hoists[0]).toMatchObject({
type: NodeTy... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<div><div>${repeat(
`<span class="foo">foo</span>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}<input indeterminate></div></div>`
)
expect(ast.hoists.length).toBe(1)
expect(ast.hoists[0]).toMatchObject({
type: NodeTy... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<table><tbody>${repeat(
`<tr class="foo"><td>foo</td></tr>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</tbody></table>`
)
expect(ast.hoists.length).toBe(1)
expect(ast.hoists[0]).toMatchObject({
type: NodeTypes.VNOD... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
() => {
const { ast } = compileWithStringify(
`<foo>${repeat(
`<div class="foo"></div>`,
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)}</foo>`
)
expect(ast.hoists.length).toBe(
StringifyThresholds.ELEMENT_WITH_BINDING_COUNT
)
ast.hoists.forEach(node => {
e... | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
ArrowFunction |
node => {
expect(node).toMatchObject({
type: NodeTypes.VNODE_CALL // not CALL_EXPRESSION
})
} | 07akioni/vue-next | packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts | TypeScript |
FunctionDeclaration |
export function getNumberOfRounds(nPlayers: number): number {
const maxCards = getMaxCards(nPlayers);
if (52 % nPlayers === 0) {
return maxCards * 2 - 1;
}
return maxCards * 2;
} | cszczepaniak/oh-hell-scorecard | app/src/lib/game/rounds.ts | TypeScript |
FunctionDeclaration |
export function getNumberOfCards(nPlayers: number, round: number): number {
const maxCards = getMaxCards(nPlayers);
if (round <= maxCards) {
return round;
}
if (52 % nPlayers === 0) {
return maxCards * 2 - round;
}
return maxCards * 2 + 1 - round;
} | cszczepaniak/oh-hell-scorecard | app/src/lib/game/rounds.ts | TypeScript |
FunctionDeclaration |
export function getMaxCards(nPlayers: number): number {
return Math.floor(52 / nPlayers);
} | cszczepaniak/oh-hell-scorecard | app/src/lib/game/rounds.ts | TypeScript |
ClassDeclaration |
export default class ConfigApi {
_storyStore: StoryStore;
constructor({ storyStore }: {
storyStore: StoryStore;
});
configure: (loaders: () => void, module: NodeModule, showDeprecationWarning?: boolean) => void;
} | AntonelaPrica/survey-ui | node_modules/@storybook/client-api/dist/ts3.4/config_api.d.ts | TypeScript |
ArrowFunction |
({breadcrumbHeight, className}) => {
const location = useLocation();
const pathnames = location.pathname.slice(1).split('/');
return (
<div className={clsx('Breadcrumb', className)}>
{pathnames.map((pathname, index) => {
const isLastIndex = index === pathnames.length - 1;
// developer
... | YashovardhanSingh/Website | src/containers/DeveloperPortal/containers/LivingWhitepaper/components/Breadcrumb/index.tsx | TypeScript |
ArrowFunction |
(pathname, index) => {
const isLastIndex = index === pathnames.length - 1;
// developer
if (index === 0) {
return (
<BreadcrumbSection
isSectionSelected={isLastIndex}
hasItems={false}
hasPrecedingArrowIcon={false}
key... | YashovardhanSingh/Website | src/containers/DeveloperPortal/containers/LivingWhitepaper/components/Breadcrumb/index.tsx | TypeScript |
TypeAliasDeclaration |
type Props = {
className?: string;
breadcrumbHeight: number;
}; | YashovardhanSingh/Website | src/containers/DeveloperPortal/containers/LivingWhitepaper/components/Breadcrumb/index.tsx | TypeScript |
MethodDeclaration |
clsx('Breadcrumb', className) | YashovardhanSingh/Website | src/containers/DeveloperPortal/containers/LivingWhitepaper/components/Breadcrumb/index.tsx | TypeScript |
FunctionDeclaration |
export async function watchGraphQLTypes(): Promise<void> {
await new Promise<never>((resolve, reject) => {
gulp.watch(GRAPHQL_SCHEMA_PATH, graphQLTypes).on('error', reject)
})
} | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
FunctionDeclaration | /** Generates the TypeScript types for the GraphQL schema */
export async function graphQLTypes(): Promise<void> {
const schemaStr = await readFile(GRAPHQL_SCHEMA_PATH, 'utf8')
const schema = buildSchema(schemaStr)
const result = (await graphql(schema, introspectionQuery)) as { data: IntrospectionQuery }
... | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
FunctionDeclaration | /**
* Generates the TypeScript types for the JSON schemas.
*/
export async function schema(): Promise<void> {
const outputDir = path.join(__dirname, '..', 'web', 'src', 'schema')
await mkdirp(outputDir)
const schemaDir = path.join(__dirname, '..', 'schema')
await Promise.all(
['json-schema-dra... | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
FunctionDeclaration |
export async function watchSchema(): Promise<void> {
await new Promise<never>((_resolve, reject) => {
gulp.watch(__dirname + '/../schema/*.schema.json', schema).on('error', reject)
})
} | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
gulp.watch(GRAPHQL_SCHEMA_PATH, graphQLTypes).on('error', reject)
} | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(name: string, interfaces: string) => interfaces | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(name: string, body: string) =>
'export ' + DEFAULT_OPTIONS.interfaceBuilder(name, body) | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(name: string, values: string) =>
'export ' + DEFAULT_OPTIONS.enumTypeBuilder(name, values) | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(name: string, body: string) => 'export ' + DEFAULT_OPTIONS.typeBuilder(name, body) | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(type: string) => `${type}[]` | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(code: string) => format(code, { ...formatOptions, parser: 'typescript' }) | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
async file => {
let schema = await readFile(path.join(schemaDir, `${file}.schema.json`), 'utf8')
// HACK: Rewrite absolute $refs to be relative. They need to be absolute for Monaco to resolve them
// when the schema is in a oneOf (to be merged with extension schemas).
sc... | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ArrowFunction |
(_resolve, reject) => {
gulp.watch(__dirname + '/../schema/*.schema.json', schema).on('error', reject)
} | erezeshkol/sourcegraph | shared/gulpfile.ts | TypeScript |
ClassDeclaration | /**
* Structure for sdt.
*/
export class SDTSection {
// table_id: number;
// section_syntax_indicator: number;
section_length: number;
// transport_stream_id: number;
// version_number: number;
// current_next_indicator: number;
// section_number: number;
// last_section_number: numbe... | goldvideo/demuxer | src/m2t/structs/sdtSection.ts | TypeScript |
ArrowFunction |
() => {
this.setState({ isBlockedListOpen: !this.state.isBlockedListOpen })
} | 0xedward/brave-core | components/brave_extension/extension/brave_extension/containers/advancedView/index.tsx | TypeScript |
ClassDeclaration |
export default class Shields extends React.PureComponent<Props, State> {
constructor (props: Props) {
super(props)
this.state = { isBlockedListOpen: false }
}
get favicon (): string {
const { url } = this.props.shieldsPanelTabData
return getFavicon(url)
}
get isShieldsEnabled (): boolean {
... | 0xedward/brave-core | components/brave_extension/extension/brave_extension/containers/advancedView/index.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
actions: {
shieldsToggled: ShieldsToggled
reportBrokenSite: ReportBrokenSite
blockAdsTrackers: BlockAdsTrackers
httpsEverywhereToggled: HttpsEverywhereToggled
blockJavaScript: BlockJavaScript
blockFingerprinting: BlockFingerprinting
blockCookies: BlockCookies
allowSc... | 0xedward/brave-core | components/brave_extension/extension/brave_extension/containers/advancedView/index.tsx | TypeScript |
InterfaceDeclaration |
interface State {
isBlockedListOpen: boolean
} | 0xedward/brave-core | components/brave_extension/extension/brave_extension/containers/advancedView/index.tsx | TypeScript |
MethodDeclaration |
render () {
const { shieldsPanelTabData, persistentData, toggleAdvancedView, actions } = this.props
const { isBlockedListOpen } = this.state
if (!shieldsPanelTabData) {
return null
}
return (
<ShieldsPanel data-test-id='brave-shields-panel' style={{ width: '370px' }} | 0xedward/brave-core | components/brave_extension/extension/brave_extension/containers/advancedView/index.tsx | TypeScript |
ClassDeclaration |
export class Game_CommonEvent {
private _commonEventId: number;
private _interpreter: Game_Interpreter;
public constructor(
commonEventId: number,
gameLoadInput?: Game_CommonEvent_OnLoad
) {
this._commonEventId = commonEventId;
this.refresh();
if (gameLoadInput... | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
InterfaceDeclaration |
export interface Game_CommonEvent_OnLoad {
_commonEventId: number;
_interpreter: Game_Interpreter_OnLoad;
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
MethodDeclaration |
public event() {
return $dataCommonEvents[this._commonEventId];
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
MethodDeclaration |
public list() {
return this.event().list;
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
MethodDeclaration |
public refresh() {
if (this.isActive()) {
if (!this._interpreter) {
this._interpreter = new Game_Interpreter();
}
} else {
this._interpreter = null;
}
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
MethodDeclaration |
public isActive() {
const event = this.event();
return event.trigger === 2 && $gameSwitches.value(event.switchId);
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
MethodDeclaration |
public update() {
if (this._interpreter) {
if (!this._interpreter.isRunning()) {
this._interpreter.setup(this.list());
}
this._interpreter.update();
}
} | FairlySadPanda/Stronk | ts/objects/Game_CommonEvent.ts | TypeScript |
ArrowFunction |
p => {
return (
<Switch>
<Route path={makePath(PORTFOLIO)} component={PortfolioView} />
<Route path={makePath(MARKETS)} component={MarketsView} />
<Route path={makePath(MARKET)} component={MarketView} />
<Redirect to={makePath(MARKETS)} />
</Switch> | jeremyschlatter/augur | packages/augur-simplified/src/modules/routes/routes.tsx | TypeScript |
MethodDeclaration |
makePath(PORTFOLIO) | jeremyschlatter/augur | packages/augur-simplified/src/modules/routes/routes.tsx | TypeScript |
ArrowFunction |
id => {
return (
<ChartCardContainer
expanded={!this.state.hiddenCharts.has(id)} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({ hiddenCharts: new Set() });
} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
ArrowFunction |
c => hiddenCharts.add(c) | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
ClassDeclaration |
export default class ChartCollection extends React.PureComponent<ChartCollectionProps, ChartCollectionState> {
private prevFilters: CollectionItemFilterObject[];
private prevSorts: CollectionItemSortObject[];
constructor(props: ChartCollectionProps) {
super(props);
this.state = {
hiddenCharts: new... | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
InterfaceDeclaration |
export interface ChartCollectionStoreProps {
chartIds: string[];
finishedRunIds: Set<number>;
} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
InterfaceDeclaration |
export interface ChartCollectionDispatchProps {
reloadCharts: (runId: number) => void;
addEmptyChart: () => void;
setChartFilters: (filters: CollectionItemFilterObject[]) => void;
setChartSorts: (sorts: CollectionItemSortObject[]) => void;
} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
InterfaceDeclaration |
export interface ChartCollectionOwnProps {} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
InterfaceDeclaration |
export interface ChartCollectionProps
extends ChartCollectionStoreProps,
ChartCollectionDispatchProps,
ChartCollectionOwnProps {} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
InterfaceDeclaration |
export interface ChartCollectionState {
runId?: number;
hiddenCharts: Set<string>;
} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
MethodDeclaration |
render() {
const charts = this.props.chartIds.map(id => {
return (
<ChartCardContainer
expanded={!this.state.hiddenCharts.has(id)}
key={id}
id={id}
toggleExpandChart={this.toggleExpandChart}
/>
);
} | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
MethodDeclaration |
return (
<div styleName="chart-collection">
<div styleName="controls" | haldenl/draco-tuner | src/components/presenters/chart-collection/ChartCollection.tsx | TypeScript |
ArrowFunction |
data => {
console.log(data);
this.emprendimientos$ = data;
this.temp = data;
this.rows = data;
} | jhovannycanas/mme | emprendimiento_front/src/app/pages/dashboard/dashboard2/dashboard2.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-dashboard2',
templateUrl: './dashboard2.component.html',
styleUrls: ['./dashboard2.component.scss']
})
export class Dashboard2Component implements OnInit {
nombre$;
emprendimientos$;
@ViewChild(DatatableComponent) table: DatatableComponent;
emprendimiento$;
... | jhovannycanas/mme | emprendimiento_front/src/app/pages/dashboard/dashboard2/dashboard2.component.ts | TypeScript |
InterfaceDeclaration |
export interface Chart {
type: ChartType;
data: Chartist.IChartistData;
options?: any;
responsiveOptions?: any;
events?: ChartEvent;
} | jhovannycanas/mme | emprendimiento_front/src/app/pages/dashboard/dashboard2/dashboard2.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.nombre$ = localStorage.getItem('nombre');
this.emprendimientoService.obtenerEmprendimientos()
.subscribe(
data => {
console.log(data);
this.emprendimientos$ = data;
this.temp = data;
this.rows = data;
},... | jhovannycanas/mme | emprendimiento_front/src/app/pages/dashboard/dashboard2/dashboard2.component.ts | TypeScript |
MethodDeclaration |
updateFilter(event) {
//this.piarescolarItem = null;
const val = event.target.value.toLowerCase();
// filter our data
const temp = this.temp.filter(function (d) {
return d.nombre.toString().toLowerCase().indexOf(val) !== -1 || !val;
});
// update th... | jhovannycanas/mme | emprendimiento_front/src/app/pages/dashboard/dashboard2/dashboard2.component.ts | TypeScript |
FunctionDeclaration |
export default function getFieldValue<Data extends DataType>(
fields: FieldsObject<Data>,
{ type, name, options, checked, value }: Ref,
): FieldValue {
if (isRadioInput(type)) {
const fieldValue = fields[name];
if (!fieldValue) throw new Error(`Expected ${name} field is missing`);
return getRadioVal... | Rolemodel01291/test | src/logic/getFieldValue.ts | TypeScript |
InterfaceDeclaration | /**
* Describes a contract consumable by Truffle, possibly including deployed instances on networks
*/
export interface ContractObject {
/**
* Name used to identify the contract
*/
contractName?: string;
abi: Abi;
metadata?: Metadata;
/**
* Bytecode sent as contract-creation transaction data, with ... | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface Ast {
[k: string]: any;
} | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface LegacyAst {
[k: string]: any;
} | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
InterfaceDeclaration | /**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[a-zA-Z0-9]+$".
*/
export interface NetworkObject {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
*/
address?: s... | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface NatSpec {
[k: string]: any;
} | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface ImmutableReferences {
/**
* This interface was referenced by `ImmutableReferences`'s JSON-Schema definition
* via the `patternProperty` "[1-9][0-9]*".
*/
[k: string]: {
start?: number;
length?: number;
}[];
} | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration | /* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run `yarn prepare` inside your local packages/contract-schema
*
* @module @truffle/contract-schema/spec
*/
/** */
/**
* Interface descriptio... | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration |
export type Metadata = string; | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration |
export type Source = string; | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration |
export type SourcePath = string; | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration |
export type SchemaVersion = string; | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
TypeAliasDeclaration |
export type GeneratedSources = {
id?: number;
language?: string;
name?: string;
contents?: string;
ast?: {
[k: string]: any;
};
}[]; | CuratorToken/meltonzheng_drafts | node_modules/@truffle/contract-schema/spec/index.d.ts | TypeScript |
FunctionDeclaration |
export function productRatingFlow(mobile?: string) {
cy.server();
createProductQuery('productQuery');
createProductSortQuery('topRated', 'query-topRated');
clickSearchIcon();
const productName = 'DSC-N1';
cy.get('cx-searchbox input').type(`${productName}{enter}`);
cy.get(resultsTitle).should('contain',... | marlass/auth-clone | projects/storefrontapp-e2e-cypress/cypress/helpers/product-search-rating-flow.ts | TypeScript |
ArrowFunction |
() => {
cy.get('.cx-facet-checkbox')
.first()
.click({ force: true });
} | marlass/auth-clone | projects/storefrontapp-e2e-cypress/cypress/helpers/product-search-rating-flow.ts | TypeScript |
ClassDeclaration |
@Component({
templateUrl: './scrollpaneldemo.html',
styles: [`
.custombar1 .ui-scrollpanel-wrapper {
border-right: 9px solid #f4f4f4;
}
.custombar1 .ui-scrollpanel-bar {
background-color: #1976d2;
opacity: 1;
transition: background-color ... | 311devs/primeng | src/app/showcase/components/scrollpanel/scrollpaneldemo.ts | TypeScript |
ClassDeclaration |
class UserRepository implements IUserRepository {
private repository: Repository<User>;
constructor() {
this.repository = getRepository(User);
}
async create({
name,
email,
password,
id_info,
}: ICreateUserDTO): Promise<void> {
const user = this.rep... | Andreferraz20/uaubox | src/modules/user/repositories/implementations/UserRepository.ts | TypeScript |
MethodDeclaration |
async create({
name,
email,
password,
id_info,
}: ICreateUserDTO): Promise<void> {
const user = this.repository.create({
name,
email,
password,
id_info,
});
await this.repository.save(user);
} | Andreferraz20/uaubox | src/modules/user/repositories/implementations/UserRepository.ts | TypeScript |
MethodDeclaration |
async findByEmail(email: string): Promise<User> {
const user = await this.repository.findOne({ email });
return user;
} | Andreferraz20/uaubox | src/modules/user/repositories/implementations/UserRepository.ts | TypeScript |
MethodDeclaration |
async findById(id: string): Promise<User> {
const user = await this.repository.findOne(id);
return user;
} | Andreferraz20/uaubox | src/modules/user/repositories/implementations/UserRepository.ts | TypeScript |
MethodDeclaration |
async softDelete(id: string): Promise<void> {
await this.repository.softDelete(id);
} | Andreferraz20/uaubox | src/modules/user/repositories/implementations/UserRepository.ts | TypeScript |
FunctionDeclaration | /**
* Handle various kinds of attributes and make them conform to JSX.
* - {x} ---> x={x}
* - x="{..}" ---> x={..}
* - lowercase DOM attributes
* - multi-value handling
*/
export function handleAttribute(htmlx: string, str: MagicString, attr: Node, parent: Node): void {
let transformedFromDirectiveO... | asafamr/language-tools | packages/svelte2tsx/src/htmlxtojsx/nodes/attribute.ts | TypeScript |
ArrowFunction |
(x) => x == name | asafamr/language-tools | packages/svelte2tsx/src/htmlxtojsx/nodes/attribute.ts | TypeScript |
ArrowFunction |
(a) => a == attrName | asafamr/language-tools | packages/svelte2tsx/src/htmlxtojsx/nodes/attribute.ts | TypeScript |
ArrowFunction |
() => {
harness.browser.i18n();
it('should get country name for DK', () => {
expect(countryService.getName('DK')).toBe('Denmark');
});
it('should get country name for UA', () => {
expect(countryService.getName('UA')).toBe('Ukraine');
});
it('should get country name given mixed case "Ua"', () => ... | nilfalse/ctf | packages/runtime/services/country/country_service.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(countryService.getName('DK')).toBe('Denmark');
} | nilfalse/ctf | packages/runtime/services/country/country_service.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(countryService.getName('UA')).toBe('Ukraine');
} | nilfalse/ctf | packages/runtime/services/country/country_service.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(countryService.getName('Ua')).toBe('Ukraine');
} | nilfalse/ctf | packages/runtime/services/country/country_service.spec.ts | TypeScript |
ArrowFunction |
() => {
test('returns empty string as invalid date', () => {
expect(getMaybeDate('').isValid()).toBe(false);
});
test('returns string with empty spaces as invalid date', () => {
expect(getMaybeDate(' ').isValid()).toBe(false);
});
test('returns string date time as valid date', () => {
expect(g... | 6paklata/kibana | x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.test.ts | TypeScript |
ArrowFunction |
() => {
expect(getMaybeDate('').isValid()).toBe(false);
} | 6paklata/kibana | x-pack/legacy/plugins/siem/public/components/formatted_date/maybe_date.test.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.