type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
writer => {
writer.write(`return new ${bufClass.name}(new ${arrayType}(capacity * ${structLength}));`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(f) => {
let params = f.parameters.slice(1);
let comment = f.documentationComment.replace(`this ${struct}`, `the current ${struct}`)
bufClass.addMethod({
name: '$' + f.name,
parameters: params.map((p) => {
return { name: p.name, type: p.type.text }
... | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return { name: p.name, type: p.type.text }
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let functionArgs = ['this', ...params.map(p => p.name)];
writer.write(`return ${f.name}(${functionArgs.join(', ')});`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
p => p.name | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} = ${other}.${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} = ${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} += ${other}.${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} += ${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} -= ${other}.${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} -= ${p.name};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} *= ${k};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
for (let p of properties) {
writer.newLine().write(`${_this}.${p.name} /= ${k};`)
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let statements = properties.map((p) => {
return `${_this}.${p.name} === ${other}.${p.name}`
})
writer.write(`return ${statements.join(" && ")};`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return `${_this}.${p.name} === ${other}.${p.name}`
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let statements = properties.map((p) => {
return `${_this}.${p.name} === ${k}`
})
writer.write(`return ${statements.join(" && ")};`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return `${_this}.${p.name} === ${k}`
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let statements = properties.map((p) => {
return `Math.abs(${_this}.${p.name} - ${other}.${p.name}) <= ${e}`
})
writer.write(`return ${statements.join(" && ")};`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return `Math.abs(${_this}.${p.name} - ${other}.${p.name}) <= ${e}`
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let statements = properties.map((p) => {
return `Math.abs(${_this}.${p.name} - ${k}) <= ${e}`
})
writer.write(`return ${statements.join(" && ")};`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return `Math.abs(${_this}.${p.name} - ${k}) <= ${e}`
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let expressions = properties.map((p) => {
return `${p.name}: \${${_this}.${p.name}}`
})
writer.write(`return \`{ ${expressions.join(", ")} }\``);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(p) => {
return `${p.name}: \${${_this}.${p.name}}`
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let node = m.tsNode as ts.MethodDeclaration;
let methodRegex = /\bthis\.\s?([a-zA-Z_$][$\w]*?\s?\()/g;
let thisRegex = /\bthis\b/g;
for (let s of node.body.statements) {
// Replace methods with functions... | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
(match, captured) => {
// and inserting "_this" as first parameter of function.
return captured + _this + ", ";
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
f => {
let params = f.parameters.slice(1);
cls.addMethod({
name: f.name,
parameters: normalizeFunctionParams(params),
documentationComment: f.documentationComment,
onWriteFunctionBody: writer => {
let functionAr... | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
let functionArgs = ['this', ...params.map(p => p.name)];
writer.write(`return ${f.name}(${functionArgs.join(', ')});`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
m => m.name.indexOf("set") === 0 && m.name.charAt(3) !== " " | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
setter => {
let args = setter.parameters.map(p => p.name);
let name = setter.name.substring("set".length);
if (name === "" || name === "$") {
name = "create" + name;
}
cls.addStaticMethod({
name: dec... | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
writer => {
writer.newLine().write(`let ${struct} = new ${cls.name}();`);
writer.newLine().write(`${struct}.${setter.name}(${args.join(", ")});`);
writer.newLine().write(`return ${struct};`);
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ArrowFunction |
p => {
return {
name: p.name,
type: p.type.node ? p.type.node.text : p.type.text,
isOptional: p.isOptional,
isRestParameter: p.isRestParameter,
defaultExpression: p.defaultExpression ? p.defaultExpression.text : null,
}
} | wjheesen/hexel-art | src/graphics/structify/structify.ts | TypeScript |
ClassDeclaration |
export class CreateTaskDto {
@IsString()
title: string;
@IsString()
description: string;
} | sarad-singh/learn-nest | src/tasks/dto/create-task.dto.ts | TypeScript |
FunctionDeclaration | /**
* Top-level entry point for tsc_wrapped.
*/
export function main(args: string[]) {
if (runAsWorker(args)) {
log('Starting TypeScript compiler persistent worker...');
runWorkerLoop(runOneBuild);
// Note: intentionally don't process.exit() here, because runWorkerLoop
// is waiting for async callba... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration |
function isCompilationTarget(
bazelOpts: BazelOptions, sf: ts.SourceFile): boolean {
if (bazelOpts.isJsTranspilation && bazelOpts.transpiledJsInputDirectory) {
// transpiledJsInputDirectory is a relative logical path, so we cannot
// compare it to the resolved, absolute path of sf here.
// compilatio... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Gather diagnostics from TypeScript's type-checker as well as other plugins we
* install such as strict dependency checking.
*/
export function gatherDiagnostics(
options: ts.CompilerOptions, bazelOpts: BazelOptions, program: ts.Program,
disabledTsetseRules: string[], plugins: DiagnosticPlugin[] = [],
... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Construct diagnostic plugins that we always want included.
*
* TODO: Call sites of getDiagnostics should initialize plugins themselves,
* including these, and the arguments to getDiagnostics should be simplified.
*/
export function getCommonPlugins(
options: ts.CompilerOptions, bazelOpts: BazelOptions,... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Returns a copy of diagnostic with one whose text has been prepended with
* an indication of what plugin contributed that diagnostic.
*
* This is slightly complicated because a diagnostic's message text can be
* split up into a chain of diagnostics, e.g. when there's supplementary info
* about a diagnostic.
... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* expandSourcesFromDirectories finds any directories under filePath and expands
* them to their .js or .ts contents.
*/
function expandSourcesFromDirectories(fileList: string[], filePath: string) {
if (filePath.endsWith('.ts') || filePath.endsWith('.tsx') ||
filePath.endsWith('.js')) {
fileList.push(... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Runs a single build, returning false on failure. This is potentially called
* multiple times (once per bazel request) when running as a bazel worker.
* Any encountered errors are written to stderr.
*/
function runOneBuild(
args: string[], inputs?: {[path: string]: string}): boolean {
if (args.length !=... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /** errorDiag produces an error diagnostic not bound to a file or location. */
function errorDiag(messageText: string) {
return {
category: ts.DiagnosticCategory.Error,
code: 0,
file: undefined,
start: undefined,
length: undefined,
messageText,
};
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | // Angular might have added files like input.ngfactory.ts or input.ngsummary.ts
// and these need to be emitted.
// TODO(arick): remove after Ivy is enabled and ngsummary/ngfactory files no longer needed
function isAngularFile(sf: ts.SourceFile) {
if (!/\.ng(factory|summary)\.ts$/.test(sf.fileName)) {
return ... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration |
function emitWithTypescript(
program: ts.Program, compilationTargets: ts.SourceFile[],
transforms: ts.CustomTransformers): ts.Diagnostic[] {
const diagnostics: ts.Diagnostic[] = [];
for (const sf of compilationTargets) {
const result = program.emit(
sf, /*writeFile*/ undefined,
/*cancel... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Runs the emit pipeline with Tsickle transformations - goog.module rewriting
* and Closure types emitted included.
* Exported to be used by the internal global refactoring tools.
* TODO(radokirov): investigate using runWithOptions and making this private
* again, if we can make compilerHosts match.
*/
export... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Creates directories subdir (a slash separated relative path) starting from
* base.
*/
function mkdirp(base: string, subdir: string) {
const steps = subdir.split(path.sep);
let current = base;
for (let i = 0; i < steps.length; i++) {
current = path.join(current, steps[i]);
if (!fs.existsSync(curre... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration | /**
* Resolve module filenames for JS modules.
*
* JS module resolution needs to be different because when transpiling JS we
* do not pass in any dependencies, so the TS module resolver will not resolve
* any files.
*
* Fortunately, JS module resolution is very simple. The imported module name
* must either a r... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
FunctionDeclaration |
function jsModuleResolver(
moduleName: string, containingFile: string,
compilerOptions: ts.CompilerOptions, host: ts.ModuleResolutionHost):
ts.ResolvedModuleWithFailedLookupLocations {
let resolvedFileName;
if (containingFile === '') {
// In tsickle we resolve the filename against '' to... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
if (!bazelOpts.typeCheck) {
return;
}
// These checks mirror ts.getPreEmitDiagnostics, with the important
// exception of avoiding b/30708240, which is that if you call
// program.getDeclarationDiagnostics() it somehow corrupts the emit.
perfTrace.wrap(`global diagnostics`, () => ... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
diagnostics.push(...program.getOptionsDiagnostics());
diagnostics.push(...program.getGlobalDiagnostics());
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
(f: ts.SourceFile) =>
bazelOpts.typeCheckDependencies || isCompilationTarget(bazelOpts, f) | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
f => isTypeCheckTarget(f) && !ignoreForDiagnostics.has(f) | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
diagnostics.push(...program.getSyntacticDiagnostics(sf));
diagnostics.push(...program.getSemanticDiagnostics(sf));
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
for (const sf of sourceFilesToCheck) {
perfTrace.wrap(`${plugin.name} checking ${sf.fileName}`, () => {
const pluginDiagnostics = plugin.getDiagnostics(sf).map((d) => {
return tagDiagnosticWithPlugin(plugin.name, d);
});
diagnostics.push(...pl... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
const pluginDiagnostics = plugin.getDiagnostics(sf).map((d) => {
return tagDiagnosticWithPlugin(plugin.name, d);
});
diagnostics.push(...pluginDiagnostics);
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
(d) => {
return tagDiagnosticWithPlugin(plugin.name, d);
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
(text: string) => `[${pluginName}] ${text}` | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
return createProgramAndEmit(
fileLoader, options, bazelOpts, sourceFiles, disabledTsetseRules)
.diagnostics;
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => ts.createProgram(
compilerHost.inputFiles, options, compilerHost, oldProgram) | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
p => bazelOpts.target.startsWith(p) | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
sf => isCompilationTarget(bazelOpts, sf) || isAngularFile(sf) | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
for (const sf of compilationTargets) {
perfTrace.wrap(`emit ${sf.fileName}`, () => {
emitResults.push(optTsickle.emitWithTsickle(
program, compilerHost, compilerHost, options, sf,
/*writeFile*/ undefined,
/*cancellationToken*/ undefined, /*emitOnlyDtsFiles*... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
emitResults.push(optTsickle.emitWithTsickle(
program, compilerHost, compilerHost, options, sf,
/*writeFile*/ undefined,
/*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, {
beforeTs: transforms.before,
afterTs: transforms.aft... | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
const manifest =
constructManifest(emitResult.modulesManifest, compilerHost);
fs.writeFileSync(bazelOpts.manifest, manifest);
} | Acidburn0zzz/rules_nodejs | third_party/github.com/bazelbuild/rules_typescript/internal/tsc_wrapped/tsc_wrapped.ts | TypeScript |
ArrowFunction |
() => {
it("should export TallyHoAdapter", () => {
expect(library.TallyHoAdapter.name).toBe("TallyHoAdapter");
});
it("should export XDeFiHDWallet", () => {
expect(library.TallyHoHDWallet.name).toBe("TallyHoHDWallet");
});
} | XDeFi-tech/hdwallet | packages/hdwallet-tallyho/src/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(library.TallyHoAdapter.name).toBe("TallyHoAdapter");
} | XDeFi-tech/hdwallet | packages/hdwallet-tallyho/src/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(library.TallyHoHDWallet.name).toBe("TallyHoHDWallet");
} | XDeFi-tech/hdwallet | packages/hdwallet-tallyho/src/index.test.ts | TypeScript |
ClassDeclaration |
export default class ContainerBlock<MD extends BDataType<IContainerBlockData> = BDataType<IContainerBlockData>, O extends DataType<IContainerBlockOptions> = DataType<IContainerBlockOptions>> extends BlockList<MD, O> implements IHasChildren {
static readonly type = 'container';
public children: Block[] = [];
... | CaelanStewart/Builder | src/ts/models/blocks/container.ts | TypeScript |
InterfaceDeclaration |
export interface IContainerBlockCapabilities extends IBlockListCapabilities {
//
} | CaelanStewart/Builder | src/ts/models/blocks/container.ts | TypeScript |
InterfaceDeclaration |
export interface IContainerBlockOptions extends IBlockOptions {
align: 'start' | 'center' | 'end';
} | CaelanStewart/Builder | src/ts/models/blocks/container.ts | TypeScript |
InterfaceDeclaration |
export interface IContainerBlockData extends IBlockListData {
children?: TAnyBlockData[];
options?: IContainerBlockOptions;
} | CaelanStewart/Builder | src/ts/models/blocks/container.ts | TypeScript |
MethodDeclaration |
getDefaultOptions(): IContainerBlockOptions {
return {
...super.getDefaultOptions(),
align: 'center'
};
} | CaelanStewart/Builder | src/ts/models/blocks/container.ts | TypeScript |
FunctionDeclaration | /// WARNING: Creates a whole new, separate Relay environment. Useful for testing.
/// Use `defaultEnvironment` for production code.
export default function createEnvironment() {
const network = new RelayNetworkLayer([
cacheMiddleware(),
urlMiddleware({
url: metaphysicsURL,
headers: {
"Cont... | dzucconi/eigen | src/lib/relay/createEnvironment.ts | TypeScript |
FunctionDeclaration |
export declare function testScrubFile(content: string): boolean; | AbhijeetGandhi/Student_Collab | node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.d.ts | TypeScript |
FunctionDeclaration |
export declare function createScrubFileTransformerFactory(isAngularCoreFile: boolean): (program?: ts.Program) => ts.TransformerFactory<ts.SourceFile>; | AbhijeetGandhi/Student_Collab | node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.d.ts | TypeScript |
FunctionDeclaration |
export declare function expect<T extends ts.Node>(node: ts.Node, kind: ts.SyntaxKind): T; | AbhijeetGandhi/Student_Collab | node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.d.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
constructor(
@InjectRepository(UserRepository)
private readonly userRepository: UserRepository
) {
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: process.env.JWT_SECRET || JwtConfig... | danielokoronkwo-coder/nest-ci | src/auth/strategies/jwt.strategy.ts | TypeScript |
MethodDeclaration |
async validate(payload: JwtPayload): Promise<User> {
const { username } = payload
const user = this.userRepository.findOne({ username })
if (!user) {
throw new UnauthorizedException();
}
return user;
} | danielokoronkwo-coder/nest-ci | src/auth/strategies/jwt.strategy.ts | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [AdminTripsComponent],
imports: [
CommonModule,
AdminTripsRoutes,
SharedModule,
],
providers: [
AdminTripsService,
],
})
export class AdminTripsModule {
} | Smip/autotourism-angular | src/app/admin/admin-trips/admin-trips.module.ts | TypeScript |
InterfaceDeclaration |
export interface TdStepsProps {
/**
* 当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成
* @default 0
*/
current?: string | number;
/**
* 当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成... | MarvenGong/tdesign-mobile-vue | src/steps/type.ts | TypeScript |
InterfaceDeclaration |
export interface TdStepItemProps {
/**
* 步骤描述
* @default ''
*/
content?: string | TNode;
/**
* 图标,默认显示内置图标,也可以自定义图标,值为 false 则不显示图标。优先级大于 `status` 定义的图标
* @default true
*/
icon?: boolean | TNode;
/**
* 当前步骤的状态
* @default default
*/
status?: StepStatus;
/**
* 标题
* @default... | MarvenGong/tdesign-mobile-vue | src/steps/type.ts | TypeScript |
TypeAliasDeclaration |
export type StepStatus = 'default' | 'process' | 'finish' | 'error'; | MarvenGong/tdesign-mobile-vue | src/steps/type.ts | TypeScript |
ClassDeclaration |
@observer
class BranchBannerComponent extends React.Component<RouteComponentProps> {
static contextType = StoreContext
context!: React.ContextType<typeof StoreContext>
render() {
const {reportStore} = this.context
const {location} = this.props
const {report} = reportStore!
// If there's no report, or it's... | AshleySherron/xivanalysis | src/components/BranchBanner.tsx | TypeScript |
MethodDeclaration |
render() {
const {reportStore} = this.context
const {location} = this.props
const {report} = reportStore!
// If there's no report, or it's still loading, there's not much we can display
if (!report || report.loading) {
return null
}
// Get the patch data for the report
const edition = languageToEd... | AshleySherron/xivanalysis | src/components/BranchBanner.tsx | TypeScript |
ClassDeclaration | /**
* @name NewBidder
* @description
* A bidder identifier, which is just the combination of an account ID and a sub-bidder ID. This is called `NewBidder` in order to distinguish between bidders that would deploy a *new* parachain and pre-existing parachains bidding to renew themselves.
*/
export class NewBidder ex... | AlexWZ0129/polkadot-js-api | packages/types/src/type/Bidder.ts | TypeScript |
ClassDeclaration | /**
* @name Bidder
* @description
* The desired target of a bidder in an auction
*/
export default class Bidder extends Enum {
constructor (value?: any) {
super({
New: NewBidder,
Existing: ParaId
}, value);
}
} | AlexWZ0129/polkadot-js-api | packages/types/src/type/Bidder.ts | TypeScript |
FunctionDeclaration |
function debug (...args: any[]) {} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
() => (dispatch) => {
if (!interventionsPromise) {
debug('Fetching all');
let api : InterventionApi = new InterventionApi();
interventionsPromise = new Promise((resolve, reject) => {
let req : Promise<Intervention[]> = api.interventionsGet({username: getUser()});
req... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(dispatch) => {
if (!interventionsPromise) {
debug('Fetching all');
let api : InterventionApi = new InterventionApi();
interventionsPromise = new Promise((resolve, reject) => {
let req : Promise<Intervention[]> = api.interventionsGet({username: getUser()});
req.then(... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
let req : Promise<Intervention[]> = api.interventionsGet({username: getUser()});
req.then((resp:Intervention[]) => {
let data = resp.reduce(idReducer, {}) as IdMap<Intervention>
dispatch({
type: INTERVENTIONS_ADD,
... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resp:Intervention[]) => {
let data = resp.reduce(idReducer, {}) as IdMap<Intervention>
dispatch({
type: INTERVENTIONS_ADD,
payload: data
});
resolve(data);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(err) => {
console.error('Error on GET Interventions', err);
reject(err);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
( uri:string ) => (dispatch) => {
debug('Fetching', uri);
let id : string = getIdFromUri(uri);
let api : InterventionApi = new InterventionApi();
let req : Promise<Intervention> = api.interventionsIdGet({username: getUser(), id: id});
req.then((resp:Intervention) => {
dispatch({
... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(dispatch) => {
debug('Fetching', uri);
let id : string = getIdFromUri(uri);
let api : InterventionApi = new InterventionApi();
let req : Promise<Intervention> = api.interventionsIdGet({username: getUser(), id: id});
req.then((resp:Intervention) => {
dispatch({
type: INTERVENTIO... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resp:Intervention) => {
dispatch({
type: INTERVENTIONS_ADD,
payload: idReducer({}, resp)
});
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(err) => {
console.error('Error on GET Intervention', err)
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(intervention:Intervention) => (dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Creating new', intervention);
let postProm = new Promise((resolve,reject) => {
let api : Interv... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Creating new', intervention);
let postProm = new Promise((resolve,reject) => {
let api : InterventionApi = new InterventionApi... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resolve,reject) => {
let api : InterventionApi = new InterventionApi(cfg);
let req = api.interventionsPost({user: user, intervention: intervention});
req.then((resp:Intervention) => {
debug('Response for POST', resp);
dispatch({
t... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resp:Intervention) => {
debug('Response for POST', resp);
dispatch({
type: INTERVENTIONS_ADD,
payload: createIdMap(resp)
});
resolve(resp);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(err) => {
console.error('Error on POST Intervention', err);
reject(err);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(intervention:Intervention) => (dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Updating', intervention);
let api : InterventionApi = new InterventionApi(cfg);
let id : string = g... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.