type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
async ({ ally }) => {
try {
const apple = ally.use('apple')
if (apple.accessDenied()) {
return 'Access was denied'
}
if (apple.stateMisMatch()) {
return 'Request expired. Retry again'
}
if (apple.hasError()) {
return apple.getError()
}
const user = await apple.use... | bitkidd/adonis-ally | examples/apple.ts | TypeScript |
ArrowFunction |
(node) => {
if (!isElementDomNode(node)) {
return {};
}
return {
...extra.parse(node),
order: +(node.getAttribute('start') ?? 1),
};
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
ArrowFunction |
(node) => {
const extraAttributes = extra.dom(node);
return node.attrs.order === 1
? ['ol', extraAttributes, 0]
: ['ol', { ...extraAttributes, start: node.attrs.order }, 0];
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
ArrowFunction |
({ t }) => t(Messages.ORDERED_LIST_LABEL) | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
ArrowFunction |
(match) => ({ order: +assertGet(match, 1) }) | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
ArrowFunction |
(match, node) => node.childCount + (node.attrs.order as number) === +assertGet(match, 1) | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
ClassDeclaration | /**
* Creates the list for the ordered list.
*/
@extension({})
export class OrderedListExtension extends NodeExtension {
get name() {
return 'orderedList' as const;
}
createTags() {
return [ExtensionTag.Block, ExtensionTag.ListContainerNode];
}
createNodeSpec(extra: ApplySchemaAttributes, override... | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
InterfaceDeclaration |
interface AllExtensions {
orderedList: OrderedListExtension;
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration |
createTags() {
return [ExtensionTag.Block, ExtensionTag.ListContainerNode];
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration |
createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec {
return {
content: 'listItem+',
...override,
attrs: {
...extra.defaults(),
order: {
default: 1,
},
},
parseDOM: [
{
tag: 'ol',
get... | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration | /**
* Automatically add the `ListItemExtension` which is required here.
*/
createExtensions() {
return [new ListItemExtension()];
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration | /**
* Toggle the ordered list for the current selection.
*/
@command({ icon: 'listOrdered', label: ({ t }) => t(Messages.ORDERED_LIST_LABEL) })
toggleOrderedList(): CommandFunction {
return toggleList(this.type, assertGet(this.store.schema.nodes, 'listItem'));
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration |
@keyBinding({ shortcut: NamedShortcut.OrderedList, command: 'toggleOrderedList' })
listShortcut(props: KeyBindingProps): boolean {
return this.toggleOrderedList()(props);
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
MethodDeclaration |
createInputRules(): InputRule[] {
return [
wrappingInputRule(
/^(\d+)\.\s$/,
this.type,
(match) => ({ order: +assertGet(match, 1) }),
(match, node) => node.childCount + (node.attrs.order as number) === +assertGet(match, 1),
),
];
} | MarielleSarmiento/remirror | packages/remirror__extension-list/src/ordered-list-extension.ts | TypeScript |
InterfaceDeclaration |
export interface Parse {
(context: Context, options?: Options): Promise<any>;
text: (context: Context, options?: Options) => Promise<any>;
form: (context: Context, options?: Options) => Promise<any>;
json: (context: Context, options?: Options) => Promise<any>;
} | 0815Strohhut/DefinitelyTyped | types/co-body/index.d.ts | TypeScript |
InterfaceDeclaration |
export interface Options {
limit?: number | string;
strict?: boolean;
queryString?: qs.IParseOptions;
jsonTypes?: string[];
returnRawBody?: boolean;
formTypes?: string[];
textTypes?: string[];
encoding?: string;
length?: number;
} | 0815Strohhut/DefinitelyTyped | types/co-body/index.d.ts | TypeScript |
TypeAliasDeclaration |
type Context = http.IncomingMessage | Koa.Context; | 0815Strohhut/DefinitelyTyped | types/co-body/index.d.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'rv-msg-detail-owner',
templateUrl: './msg-detail-owner.component.html',
styleUrls: ['./msg-detail-owner.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class MsgDetailOwnerComponent implements OnInit {
constructor() { }
ngOnInit() {
}
} | gutropolis/rvtrailer | src/app/shared/msg-detail-owner/msg-detail-owner.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
} | gutropolis/rvtrailer | src/app/shared/msg-detail-owner/msg-detail-owner.component.ts | TypeScript |
FunctionDeclaration |
function expandPathResolving(path: string) {
if (path.startsWith('~/')) {
return path.replace('~', homedir());
}
return path;
} | 0xc0deface/rust-analyzer | editors/code/src/server.ts | TypeScript |
ArrowFunction |
(messageOrDataObject: string | any, data?: string) => {
if (typeof messageOrDataObject === 'string') {
if (
messageOrDataObject.includes(
'rust-analyzer/publishDecorations'
) ||
messa... | 0xc0deface/rust-analyzer | editors/code/src/server.ts | TypeScript |
ArrowFunction |
() => {
for (const [type, handler] of notificationHandlers) {
Server.client.onNotification(type, handler);
}
} | 0xc0deface/rust-analyzer | editors/code/src/server.ts | TypeScript |
ClassDeclaration |
export class Server {
public static highlighter = new Highlighter();
public static config = new Config();
public static client: lc.LanguageClient;
public static start(
notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>
) {
// '.' Is the fallback if no folder is... | 0xc0deface/rust-analyzer | editors/code/src/server.ts | TypeScript |
MethodDeclaration |
public static start(
notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]>
) {
// '.' Is the fallback if no folder is open
// TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file.
let folder: stri... | 0xc0deface/rust-analyzer | editors/code/src/server.ts | TypeScript |
FunctionDeclaration |
async function writeFiles(testInfo: TestInfo, files: Files) {
const baseDir = testInfo.outputPath();
const headerJS = `
const pwt = require('@playwright/test');
`;
const headerTS = `
import * as pwt from '@playwright/test';
`;
const headerESM = `
import * as pwt from '@playwright/test';
`;
... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
FunctionDeclaration |
async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDir: string, params: any, env: Env, options: RunOptions): Promise<RunResult> {
const paramList = [];
for (const key of Object.keys(params)) {
for (const value of Array.isArray(params[key]) ? params[key] : [params[key]]) {
... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
FunctionDeclaration |
function visitSuites(suites?: JSONReportSuite[]) {
if (!suites)
return;
for (const suite of suites) {
for (const spec of suite.specs) {
for (const test of spec.tests)
results.push(...test.results);
}
visitSuites(suite.suites);
}
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
FunctionDeclaration |
export function stripAnsi(str: string): string {
return str.replace(asciiRegex, '');
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
FunctionDeclaration |
export function countTimes(s: string, sub: string): number {
let result = 0;
for (let index = 0; index !== -1;) {
index = s.indexOf(sub, index);
if (index !== -1) {
result++;
index += sub.length;
}
}
return result;
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
name => name.includes('.config.') | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async name => {
const fullName = path.join(baseDir, name);
await fs.promises.mkdir(path.dirname(fullName), { recursive: true });
const isTypeScriptSourceFile = name.endsWith('.ts') && !name.endsWith('.d.ts');
const isJSModule = name.endsWith('.mjs') || name.includes('esm');
const header = isTypeScr... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
() => {
if (options.sendSIGINTAfter && !didSendSigint && countTimes(testProcess.output, '%%SEND-SIGINT%%') >= options.sendSIGINTAfter) {
didSendSigint = true;
process.kill(testProcess.process.pid, 'SIGINT');
}
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
(re: RegExp) => {
let result = 0;
let match = re.exec(outputString);
while (match) {
result += (+match[1]);
match = re.exec(outputString);
}
return result;
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async ({}, use, testInfo) => {
await use(files => writeFiles(testInfo, files));
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
files => writeFiles(testInfo, files) | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async ({ childProcess }, use, testInfo: TestInfo) => {
await use(async (files: Files, params: Params = {}, env: Env = {}, options: RunOptions = {}) => {
const baseDir = await writeFiles(testInfo, files);
return await runPlaywrightTest(childProcess, baseDir, params, env, options);
})... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async (files: Files, params: Params = {}, env: Env = {}, options: RunOptions = {}) => {
const baseDir = await writeFiles(testInfo, files);
return await runPlaywrightTest(childProcess, baseDir, params, env, options);
} | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async ({ childProcess }, use, testInfo) => {
await use(async files => {
const baseDir = await writeFiles(testInfo, { 'tsconfig.json': JSON.stringify(TSCONFIG), ...files });
const tsc = childProcess({
command: ['npx', 'tsc', '-p', baseDir],
cwd: baseDir,
s... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
async files => {
const baseDir = await writeFiles(testInfo, { 'tsconfig.json': JSON.stringify(TSCONFIG), ...files });
const tsc = childProcess({
command: ['npx', 'tsc', '-p', baseDir],
cwd: baseDir,
shell: true,
});
const { exitCode } = await ... | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type RunResult = {
exitCode: number,
output: string,
passed: number,
failed: number,
flaky: number,
skipped: number,
report: JSONReport,
results: any[],
}; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type TSCResult = {
output: string;
exitCode: number;
}; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type Files = { [key: string]: string | Buffer }; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type Params = { [key: string]: string | number | boolean | string[] }; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type Env = { [key: string]: string | number | boolean | undefined }; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type RunOptions = {
sendSIGINTAfter?: number;
usesCustomOutputDir?: boolean;
additionalArgs?: string[];
}; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
TypeAliasDeclaration |
type Fixtures = {
writeFiles: (files: Files) => Promise<string>;
runInlineTest: (files: Files, params?: Params, env?: Env, options?: RunOptions) => Promise<RunResult>;
runTSC: (files: Files) => Promise<TSCResult>;
}; | yongdamsh/playwright | tests/playwright-test/playwright-test-fixtures.ts | TypeScript |
ArrowFunction |
() => {
it("should match snapshot", () => {
const { container } = render(
<FMCircularProgress testID="circular-progress-test" />
);
expect(container).toMatchSnapshot();
});
} | HZN-one/flex | test/Components/Molecules/FMCircularProgress/FMCircularProgress.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { container } = render(
<FMCircularProgress testID="circular-progress-test" />
);
expect(container).toMatchSnapshot();
} | HZN-one/flex | test/Components/Molecules/FMCircularProgress/FMCircularProgress.spec.tsx | TypeScript |
FunctionDeclaration |
function _ModAlertWeb(props: IAlertShow) {
const { title = '', type = 'warning', subtitle, timeout = 5000 } = props;
const timeoutInstance: any = useRef();
const eligibleToDismiss = useRef<boolean>(false);
const [ready, setReady] = useState(true);
const [visible, setVisible] = useState(false);
const isMounted =... | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
props => (props.visible === 'yes' ? 36 : -460) | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
props => styleColor[props.type] | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
timeoutInstance.current && clearTimeout(timeoutInstance.current);
isMounted.current && setVisible(false);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
setTimeout(() => {
setVisible(true);
timeoutInstance.current = setTimeout(() => {
isMounted.current && setVisible(false);
}, timeout + 1000);
setTimeout(() => {
eligibleToDismiss.current = true;
}, 100);
}, 500);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
setVisible(true);
timeoutInstance.current = setTimeout(() => {
isMounted.current && setVisible(false);
}, timeout + 1000);
setTimeout(() => {
eligibleToDismiss.current = true;
}, 100);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
isMounted.current && setVisible(false);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
eligibleToDismiss.current = true;
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
eligibleToDismiss.current &&
!visible &&
setTimeout(() => {
isMounted.current && setReady(false);
}, 1000);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
ArrowFunction |
() => {
isMounted.current && setReady(false);
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
InterfaceDeclaration |
export interface IAlertShow {
id?: string;
title: string;
subtitle?: string;
type?: 'warning' | 'success' | 'info';
timeout?: number;
} | edyCodeforLife/MAMAGURUASSESMENT | src/components/alert/custom-alert.tsx | TypeScript |
FunctionDeclaration |
function generateFileHashMap(): Map<string, string> {
const hashes = new Map<string, string>();
host.scopedSync().list(normalize('./dist')).forEach(name => {
const matches = name.match(OUTPUT_RE);
if (matches) {
const [, module, hash] = matches;
hashes.set(module, hash)... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
FunctionDeclaration |
function validateHashes(
oldHashes: Map<string, string>,
newHashes: Map<string, string>,
shouldChange: Array<string>,
): void {
newHashes.forEach((hash, module) => {
if (hash == oldHashes.get(module)) {
if (shouldChange.includes(module)) {
throw new Error(
... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
done => host.initialize().subscribe(undefined, done.fail, done) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
done => host.restore().subscribe(undefined, done.fail, done) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
(done) => {
const OUTPUT_RE = /(main|styles|lazy\.module)\.([a-z0-9]+)\.(chunk|bundle)\.(js|css)$/;
function generateFileHashMap(): Map<string, string> {
const hashes = new Map<string, string>();
host.scopedSync().list(normalize('./dist')).forEach(name => {
const matches = name.match(OUTP... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
name => {
const matches = name.match(OUTPUT_RE);
if (matches) {
const [, module, hash] = matches;
hashes.set(module, hash);
}
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
(hash, module) => {
if (hash == oldHashes.get(module)) {
if (shouldChange.includes(module)) {
throw new Error(
`Module "${module}" did not change hash (${hash}), but was expected to.`);
}
} else if (!shouldChange.includes(module)) {
throw new Erro... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
// Save the current hashes.
oldHashes = generateFileHashMap();
host.writeMultipleFiles(lazyModuleFiles);
host.writeMultipleFiles(lazyModuleImport);
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => runTargetSpec(host, browserTargetSpec, overrides) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
newHashes = generateFileHashMap();
validateHashes(oldHashes, newHashes, []);
oldHashes = newHashes;
host.writeMultipleFiles({ 'src/styles.css': 'body { background: blue; }' });
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
newHashes = generateFileHashMap();
validateHashes(oldHashes, newHashes, ['styles']);
oldHashes = newHashes;
host.writeMultipleFiles({ 'src/app/app.component.css': 'h1 { margin: 10px; }' });
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
newHashes = generateFileHashMap();
validateHashes(oldHashes, newHashes, ['main']);
oldHashes = newHashes;
host.appendToFile('src/app/lazy/lazy.module.ts', `console.log(1);`);
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
newHashes = generateFileHashMap();
validateHashes(oldHashes, newHashes, ['lazy.module']);
oldHashes = newHashes;
host.appendToFile('src/main.ts', '');
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
newHashes = generateFileHashMap();
validateHashes(oldHashes, newHashes, []);
} | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
(done) => {
host.writeMultipleFiles({ 'src/styles.css': `h1 { background: url('./spectrum.png')}` });
host.writeMultipleFiles(lazyModuleFiles);
host.writeMultipleFiles(lazyModuleImport);
// We must do several builds instead of a single one in watch mode, so that the output
// path is deleted on ea... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /ven... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => runTargetSpec(host, browserTargetSpec,
{ outputHashing: 'none', extractCss: true }) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /vendor... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => runTargetSpec(host, browserTargetSpec,
{ outputHashing: 'media', extractCss: true }) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeFalsy();
expect(host.fileMatchExists('dist', /vendor... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => runTargetSpec(host, browserTargetSpec,
{ outputHashing: 'bundles', extractCss: true }) | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ArrowFunction |
() => {
expect(host.fileMatchExists('dist', /runtime\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /main\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /polyfills\.[0-9a-f]{20}\.js/)).toBeTruthy();
expect(host.fileMatchExists('dist', /ven... | ThomasBurleson/devkit | packages/angular_devkit/build_angular/test/browser/output-hashing_spec_large.ts | TypeScript |
ClassDeclaration |
@Resolver('Scoreboard')
export class ScoreboardResolver {
constructor(private readonly scoreboardService: ScoreboardService) {}
@Query('findScoreboards')
async findAll(@Args('league') league: string) {
return await this.scoreboardService.findAll(league);
}
@Query('scoreboards')
async scoreboards(
... | jackhenry/blindfold-api | src/scoreboard/resolvers/scoreboard.resolver.ts | TypeScript |
MethodDeclaration |
@Query('findScoreboards')
async findAll(@Args('league') league: string) {
return await this.scoreboardService.findAll(league);
} | jackhenry/blindfold-api | src/scoreboard/resolvers/scoreboard.resolver.ts | TypeScript |
MethodDeclaration |
@Query('scoreboards')
async scoreboards(
@Args('league') league: string,
@Args('filterValue') filterValue: number,
) {
return await this.scoreboardService.scoreboards(league, filterValue);
} | jackhenry/blindfold-api | src/scoreboard/resolvers/scoreboard.resolver.ts | TypeScript |
MethodDeclaration |
@Query('filters')
async findFilters(@Args('league') league: string) {
return await this.scoreboardService.findFilters(league);
} | jackhenry/blindfold-api | src/scoreboard/resolvers/scoreboard.resolver.ts | TypeScript |
MethodDeclaration |
@Mutation('createScoreboard')
async createScoreboard(@Args('input') dto: CreateScoreboardDto) {
return await this.scoreboardService.update(dto);
} | jackhenry/blindfold-api | src/scoreboard/resolvers/scoreboard.resolver.ts | TypeScript |
ClassDeclaration |
export declare class ApiError extends CustomError {
code: APIErrorCode;
info: string;
constructor(code: APIErrorCode, info: string);
} | Davinci-Leonardo/cardano-js-sdk | packages/cip30/dist/errors/ApiError.d.ts | TypeScript |
EnumDeclaration |
export declare enum APIErrorCode {
InvalidRequest = -1,
InternalError = -2,
Refused = -3
} | Davinci-Leonardo/cardano-js-sdk | packages/cip30/dist/errors/ApiError.d.ts | TypeScript |
FunctionDeclaration |
function handleStateChange(stateFilter: string) {
proposalsCtx.changeStateFilter(stateFilter);
} | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
FunctionDeclaration |
function handleBackClick() {
history.push('/governance/overview');
} | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ArrowFunction |
() => {
const history = useHistory();
const wallet = useWallet();
const daoCtx = useDAO();
const proposalsCtx = useProposals();
const [state, setState] = useMergeState<ProposalsViewState>(InitialState);
function handleStateChange(stateFilter: string) {
proposalsCtx.changeStateFilter(stateFilter);
}... | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ArrowFunction |
(ev: React.ChangeEvent<HTMLInputElement>) => {
proposalsCtx.changeSearchFilter(ev.target.value);
} | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ArrowFunction |
() => {
daoCtx.actions.hasActiveProposal().then(hasActiveProposal => {
setState({ hasActiveProposal });
});
} | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ArrowFunction |
hasActiveProposal => {
setState({ hasActiveProposal });
} | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ArrowFunction |
() => {
const history = useHistory();
const dao = useDAO();
function handleBackClick() {
history.push('/governance/overview');
}
if (dao.isActive === undefined) {
return <AntdSpin />;
}
if (!dao.isActive) {
return (
<Grid flow="row" gap={24} align="start">
<Button type="link"... | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
TypeAliasDeclaration |
type ProposalsViewState = {
hasActiveProposal?: boolean;
showWhyReason: boolean;
}; | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
MethodDeclaration |
proposals
< | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
MethodDeclaration |
setState({ showWhyReason: visible }) | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
MethodDeclaration |
handleSearchChange(ev) | zhiiker/barnbridge-frontend | src/modules/governance/views/proposals-view/index.tsx | TypeScript |
ClassDeclaration |
export default abstract class AbstractSortDropdown<T extends SortDropdownAttrs> extends Component<T> {
view(): import("mithril").Vnode<{
className: string;
buttonClassName: string;
label: string;
}, unknown>;
className(): string;
activeSort(): string;
applySort(sort: string)... | flamarkt/core | js/dist-typings/common/components/AbstractSortDropdown.d.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.