type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(m) => m.TracuuModule | HaiDang901/TeacherManagerUTEHY2020Angular | src/app/main/main.module.ts | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [
SidebarComponent,
FooterComponent,
NavbarComponent,
MainComponent,
GiaovienComponent,
KhoaComponent,
GiangdayComponent,
DashboardComponent,
TracuuComponent,
// TkgvkhoaComponent,
// TkgvnuComponent,
// TracuuComponent,
// DangkigdCompone... | HaiDang901/TeacherManagerUTEHY2020Angular | src/app/main/main.module.ts | TypeScript |
FunctionDeclaration |
export function deserializeHash(hash: string): Uint8Array {
return Base64.toUint8Array(hash.slice(1));
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
FunctionDeclaration |
export function serializeHash(hash: Uint8Array): string {
return `u${Base64.fromUint8Array(hash, true)}`;
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
FunctionDeclaration |
export function millisToTimestamp(millis: number): Timestamp {
const secs = Math.floor(millis / 1000);
const nanos = (millis % 1000) * 1000;
return [secs, nanos];
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
FunctionDeclaration |
export function timestampToMillis(timestamp: Timestamp): number {
return timestamp[0] * 1000 + Math.floor(timestamp[1] / 1000);
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
FunctionDeclaration |
export function now(): Timestamp {
return millisToTimestamp(Date.now());
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
InterfaceDeclaration |
export interface Hashed<T> {
hash: string;
content: T;
} | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
TypeAliasDeclaration |
export type Timestamp = [number, number]; | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
TypeAliasDeclaration |
export type Dictionary<T> = { [key: string]: T }; | holochain-engineers/starter-ui | ui/src/app/helpers/utils.ts | TypeScript |
FunctionDeclaration |
export function activate(_context: ExtensionContext) {
languages.registerDocumentFormattingEditProvider(
"fennel",
new FennelFormatProvider()
);
} | midouest/vsc-fnlfmt | src/extension.ts | TypeScript |
ClassDeclaration |
@Controller()
@ApiSecurity('APIKey')
@ApiTags('Span Method Codes')
export class SpanMethodCodeController {
constructor(private readonly service: SpanMethodCodeService) {}
@Get()
@ApiOkResponse({
isArray: true,
type: SpanMethodCodeDTO,
description: 'Retrieves all span method codes',
})
@ApiBadReq... | US-EPA-CAMD/easey-mdm-api | src/span-method-code/span-method-code.controller.ts | TypeScript |
MethodDeclaration |
@Get()
@ApiOkResponse({
isArray: true,
type: SpanMethodCodeDTO,
description: 'Retrieves all span method codes',
})
@ApiBadRequestResponse({
description: 'Invalid Request',
})
getSpanMethodCodes(): Promise<SpanMethodCodeDTO[]> {
return this.service.getSpanMethodCodes();
} | US-EPA-CAMD/easey-mdm-api | src/span-method-code/span-method-code.controller.ts | TypeScript |
ArrowFunction |
(parameters, index) => {
const controller = new ValueController({
fluid: true,
label: `${index}`.padStart(parametersPadding, ' '),
...parameters
})
controller.on('update', (event) => event.stopPropagation())
this.parametersController!.add(controller)
... | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
ArrowFunction |
(event) => event.stopPropagation() | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
ArrowFunction |
controller => (controller as ValueController).value | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
ClassDeclaration |
@define('method-field') export class MethodField extends Field<
(...args: unknown[]) => void
> {
protected parametersController?: GroupController
/**
* @ignore
*/
public static styles = css`
${Field.styles}
button {
width: calc(100% - 2 * var(--padding));
border: 1px solid var(--pri... | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
InterfaceDeclaration |
export interface MethodFieldParameters extends FieldParameters<
(...args: unknown[]) => void
> {
args?: ValueControllerFieldParameters[]
} | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
MethodDeclaration |
protected trigger(): void {
if (this.parametersController) {
this.value(...this.parametersController.childControllers
.map(controller => (controller as ValueController).value)
)
} else {
this.value()
}
} | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
MethodDeclaration | /**
* @ignore
*/
public render(): TemplateResult {
return html`
${this.parametersController ? this.parametersController : ''}
<button .disabled=${this.disabled} @click=${this.trigger}>Trigger</button>
`
} | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
MethodDeclaration | /**
* @ignore
*/
public static match({ value = undefined }: Record<string, any>): boolean {
return typeof value === 'function'
} | SolalDR/gui-1 | src/fields/method-field.ts | TypeScript |
FunctionDeclaration |
export function SideBar({ handleClickButton, selectedGenreId }: HandleClickButtonProps) {
const [genres, setGenres] = useState<GenreResponseProps[]>([]);
useEffect(() => {
api.get<GenreResponseProps[]>('genres').then(response => {
setGenres(response.data);
});
}, []);
return (
<nav classNam... | DiegoSouza7/Componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
ArrowFunction |
genre => (
<Button
id={String(genre.id | DiegoSouza7/Componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
InterfaceDeclaration |
interface HandleClickButtonProps {
handleClickButton: (id: number) => void;
selectedGenreId: number;
} | DiegoSouza7/Componentizando-a-aplicacao | src/components/SideBar.tsx | TypeScript |
ArrowFunction |
() =>
this.updateData().then(() => this.refresh()) | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
ArrowFunction |
() => this.refresh() | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
ArrowFunction |
(x) =>
new ProjectItem(
x,
!!this.vercel.selectedProject && this.vercel.selectedProject === x.id
) | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
ClassDeclaration |
export class ProjectsProvider
implements vscode.TreeDataProvider<vscode.TreeItem> {
private _onDidChangeTreeData: vscode.EventEmitter<undefined> = new vscode.EventEmitter()
readonly onDidChangeTreeData: vscode.Event<undefined> = this
._onDidChangeTreeData.event
private data: Array<Project> = []
private... | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
ClassDeclaration |
class ProjectItem extends vscode.TreeItem {
constructor(data: Project, selected: boolean) {
super(data.name)
this.description = timeago.format(data.updatedAt, 'en_SHORT')
this.command = {
command: 'vscode-vercel.switchProject',
title: 'Switch Vercel Project',
arguments: [data.id],
}... | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
MethodDeclaration |
private async updateData() {
const res = await this.vercel.getProjects()
this.data = res.projects
} | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
MethodDeclaration |
private refresh() {
this._onDidChangeTreeData.fire(undefined)
} | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
MethodDeclaration |
getTreeItem(element: ProjectItem): vscode.TreeItem {
return element
} | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
MethodDeclaration |
async getChildren(): Promise<Array<vscode.TreeItem>> {
if (this.data.length === 0) {
await this.updateData()
}
return this.data.map(
(x) =>
new ProjectItem(
x,
!!this.vercel.selectedProject && this.vercel.selectedProject === x.id
)
)
} | frencojobs/vscode-vercel | src/features/ProjectsProvider.ts | TypeScript |
ArrowFunction |
(elem) =>
elem.offsetWidth > 0 ||
elem.offsetHeight > 0 ||
elem.getClientRects().length > 0 | NarikMe/narik-angular | projects/narik-common/src/lib/directives/tab-guard.directive.ts | TypeScript |
ClassDeclaration | /**
* TabGuardDirective
* Uses to keep Tab circle on a element.
* Usually use for data forms.
*/
@Directive({ selector: '[tab-guard]' })
export class TabGuardDirective {
constructor(private element: ElementRef) {}
/**
* Whether tabGuard is active or not
*/
@Input('tab-guard')
active = tru... | NarikMe/narik-angular | projects/narik-common/src/lib/directives/tab-guard.directive.ts | TypeScript |
MethodDeclaration |
@HostListener('keydown', ['$event'])
onHover(e: KeyboardEvent) {
if (!this.active) {
return;
}
if (e.keyCode === TAB) {
const selectorElements = [
'button:not([disabled])',
'[href]',
"input:not([disabled]):not([readonly... | NarikMe/narik-angular | projects/narik-common/src/lib/directives/tab-guard.directive.ts | TypeScript |
ClassDeclaration |
@Module({
providers: [OptionResolver],
})
export class OptionModule {} | aceHubert/vue-plumemo-blog | po-nodejs/src/options/option.module.ts | TypeScript |
ArrowFunction |
() => {
let component: EditCarritoComponent;
let fixture: ComponentFixture<EditCarritoComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ EditCarritoComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(Ed... | Cabanesdev/wildCartAngularClient2021 | src/app/component/application/routed/carrito/edit/edit-carrito.component.spec.ts | TypeScript |
ArrowFunction |
async () => {
await TestBed.configureTestingModule({
declarations: [ EditCarritoComponent ]
})
.compileComponents();
} | Cabanesdev/wildCartAngularClient2021 | src/app/component/application/routed/carrito/edit/edit-carrito.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(EditCarritoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
} | Cabanesdev/wildCartAngularClient2021 | src/app/component/application/routed/carrito/edit/edit-carrito.component.spec.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class PostsMiddleware implements NestMiddleware {
use(req: express.Request, res: express.Response, next: express.NextFunction) {
// express.raw({ type: '*/*' })(req, res, next);
console.log(req.body);
next();
}
} | Sayan3sarkar/nest-mongo | src/posts/posts.middlware.ts | TypeScript |
MethodDeclaration |
use(req: express.Request, res: express.Response, next: express.NextFunction) {
// express.raw({ type: '*/*' })(req, res, next);
console.log(req.body);
next();
} | Sayan3sarkar/nest-mongo | src/posts/posts.middlware.ts | TypeScript |
InterfaceDeclaration | /**
* Represents an action that references an existing document.
*/
export interface ActionDocumentId {
/**
* The document ID
*/
document_id: EntityIdType;
} | reactgular/bookmarks | src/app/states/actions/action-document-id.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "V1TokenReview");
if (response.statusCode &&... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
ArrowFunction |
(error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "V1TokenReview");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "V1APIResourceList");
if (response.statusCod... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
ArrowFunction |
(error, response, body) => {
if (error) {
reject(error);
} else {
body = ObjectSerializer.deserialize(body, "V1APIResourceList");
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
ClassDeclaration |
export class AuthenticationV1Api {
protected _basePath = defaultBasePath;
protected defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
protected authentications = {
'default': <Authentication>new VoidAuth(),
'BearerToken': new ApiKeyAuth('header', 'authorization'),... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
EnumDeclaration | // ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export enum AuthenticationV1ApiApiKeys {
BearerToken,
} | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
MethodDeclaration |
public setApiKey(key: AuthenticationV1ApiApiKeys, value: string) {
(this.authentications as any)[AuthenticationV1ApiApiKeys[key]].apiKey = value;
} | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
MethodDeclaration | /**
* create a TokenReview
* @param body
* @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processe... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
MethodDeclaration | /**
* get available resources
*/
public async getAPIResources (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1APIResourceList; }> {
const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/';
let localVarQueryParam... | benbuzbee/javascript | src/gen/api/authenticationV1Api.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const webServer = http.createServer(expressApplication);
webServer.on('error', (error) => {
reject(error);
});
webServer.on('listening', () => {
const { address, port } = <AddressInfo>webServer.address();
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
ArrowFunction |
(error) => {
reject(error);
} | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
ArrowFunction |
() => {
const { address, port } = <AddressInfo>webServer.address();
// noinspection HttpUrlsUsage
console.log(`HTTP-Server is running under http://${address}:${port}`);
resolve(webServer);
} | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const io = new socketIO.Server(webServer);
io.on('connection', (socket) => {
console.log('Connected.');
for (const event of this.events) {
socket.on(event.name, event.exec);
}
});
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
ArrowFunction |
(socket) => {
console.log('Connected.');
for (const event of this.events) {
socket.on(event.name, event.exec);
}
} | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
ClassDeclaration |
export class TimeManagerAPI {
events: TimeManagerEvent[] = [];
public async start() {
await this.connectToDatabase();
await this.setupPermissions();
if (!(await User.findOne({ where: { email: Config.OWNER_EMAIL } }))) {
await this.createDefaultAdminAccount();
}
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async start() {
await this.connectToDatabase();
await this.setupPermissions();
if (!(await User.findOne({ where: { email: Config.OWNER_EMAIL } }))) {
await this.createDefaultAdminAccount();
}
const expressApplication = await this.setupExpressApplication();
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async connectToDatabase() {
console.log('Connecting to database..');
await createConnection({
type: Config.DATABASE_TYPE,
host: Config.DATABASE_HOST,
port: Config.DATABASE_PORT,
username: Config.DATABASE_USER,
password: Config.DATABASE_... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async setupPermissions() {
const permissionNames = [
'LIST_USERS',
'CREATE_USERS',
'VIEW_USERS'
];
for (const permissionName of permissionNames) {
if (!await Permission.findOne({ where: { name: permissionName } })) {
const ... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async createDefaultAdminAccount() {
const [firstName, lastName] = Config.OWNER_NAME.split(' ');
const password = crypto.randomBytes(32).toString('base64');
const user = new User();
user.firstName = firstName || 'Default';
user.lastName = lastName || 'Admin';
user... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async setupExpressApplication(): Promise<ExpressApplication> {
const expressApplication = express();
expressApplication.use(helmet());
expressApplication.use(compression({ threshold: 0 }));
expressApplication.use(morgan(Config.NODE_ENV === 'development' ? 'dev' : 'combined'));
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public setupWebServer(expressApplication: ExpressApplication): Promise<http.Server> {
return new Promise<http.Server>((resolve, reject) => {
const webServer = http.createServer(expressApplication);
webServer.on('error', (error) => {
reject(error);
});
... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public async loadEvents(SocketIOServer: socketIO.Server) {
const files = await fs.promises.readdir(path.join(__dirname, 'events'));
for (const file of files) {
if (file.startsWith('-')) continue;
const EventClass: TimeManagerEvent = (await import(path.join(__dirname, 'events', ... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
MethodDeclaration |
public setupSocketIOServer(webServer: http.Server): Promise<socketIO.Server> {
return new Promise<socketIO.Server>((resolve, reject) => {
const io = new socketIO.Server(webServer);
io.on('connection', (socket) => {
console.log('Connected.');
for (const ... | UnlimitedBytes/TimeManager-API | src/TimeManagerAPI.ts | TypeScript |
FunctionDeclaration |
export function logIn(session_id: string) {
const req: AuthRequest = { auth_type: 'LogIn', session_id };
return Request.auth(req);
} | MadCatX/WebMMB | src/mmb/auth-request.ts | TypeScript |
FunctionDeclaration |
export function logOut() {
const req: AuthRequest = { auth_type: 'LogOut', session_id: '' };
return Request.auth(req);
} | MadCatX/WebMMB | src/mmb/auth-request.ts | TypeScript |
ArrowFunction |
emails => this.emails = emails | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
phones => this.phones = phones | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
x => this | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
() => {
Dexie.Promise.all(
// Save existing arrays
Dexie.Promise.all(this.emails.map(email => db.emails.put(email))),
Dexie.Promise.all(this.phones.map(phone => db.phones.put(phone))))
.then(results => {
// ... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
email => db.emails.put(email) | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
phone => db.phones.put(phone) | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
results => {
// Remove items from DB that is was not saved here:
var emailIds = results[0], // array of resulting primary keys
phoneIds = results[1]; // array of resulting primary keys
db.emails.where('contactId').equals(this.id)
... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
email => emailIds.indexOf(email.id) === -1 | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
phone => phoneIds.indexOf(phone.id) === -1 | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ArrowFunction |
id => this.id = id | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ClassDeclaration |
export class AppDatabase extends Dexie {
contacts: Dexie.Table<Contact, number>;
emails: Dexie.Table<IEmailAddress, number>;
phones: Dexie.Table<IPhoneNumber, number>;
constructor() {
super("MyTypeScriptAppDb");
var db = this;
//
// D... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ClassDeclaration | /* This is a 'physical' class that is mapped to
* the contacts table. We can have methods on it that
* we could call on retrieved database objects.
*/
export class Contact {
id: number;
first: string;
last: string;
emails: IEmailAddress[];
phones: IPhoneNumber[];
... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
InterfaceDeclaration | /* Just for code completion and compilation - defines
* the interface of objects stored in the emails table.
*/
export interface IEmailAddress {
id?: number;
contactId: number;
type: string;
email: string;
} | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
InterfaceDeclaration | /* Just for code completion and compilation - defines
* the interface of objects stored in the phones table.
*/
export interface IPhoneNumber {
id?: number;
contactId: number;
type: string;
phone: string;
} | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
MethodDeclaration |
loadEmailsAndPhones() {
return Dexie.Promise.all(
db.emails
.where('contactId').equals(this.id)
.toArray(emails => this.emails = emails)
,
db.phones
.where('contactId').equals(this.id)
.t... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
MethodDeclaration |
save() {
return db.transaction('rw', db.contacts, db.emails, db.phones, () => {
Dexie.Promise.all(
// Save existing arrays
Dexie.Promise.all(this.emails.map(email => db.emails.put(email))),
Dexie.Promise.all(this.phones.map(phone =... | jacobmarshall-etc/ng-dexie | samples/typescript/appdb.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-bar-chart',
templateUrl: './bar-chart.component.html',
})
export class BarChartComponent {
@ViewChild('chart') chart: ChartComponent;
public chartOptions: Partial<ChartOptions>;
constructor() {
this.chartOptions = {
series: [
{
name: 'Activ... | tushgup/mci-ubicomp | src/app/DemoPages/Charts/chartjs/examples/bar-chart/bar-chart.component.ts | TypeScript |
InterfaceDeclaration |
export interface ChartOptions {
series: ApexAxisChartSeries;
chart: ApexChart;
dataLabels: ApexDataLabels;
plotOptions: ApexPlotOptions;
yaxis: ApexYAxis;
xaxis: ApexXAxis;
fill: ApexFill;
title: ApexTitleSubtitle;
colors: string[];
} | tushgup/mci-ubicomp | src/app/DemoPages/Charts/chartjs/examples/bar-chart/bar-chart.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-dashboard',
templateUrl: './default-layout.component.html',
})
export class DefaultLayoutComponent {
public sidebarMinimized = false;
public navItems = navItems;
constructor(private appservice: AppService, private router: Router, private notify: NotificationService) {}
toggleM... | bhavinpatelpune/digi-bank-app | src/app/containers/default-layout/default-layout.component.ts | TypeScript |
MethodDeclaration |
toggleMinimize(e) {
this.sidebarMinimized = e;
} | bhavinpatelpune/digi-bank-app | src/app/containers/default-layout/default-layout.component.ts | TypeScript |
MethodDeclaration |
logout() {
this.appservice.clearLocalStorageData();
this.router.navigate(['/login']);
this.notify.showSuccess('You have been logged out successfully!');
} | bhavinpatelpune/digi-bank-app | src/app/containers/default-layout/default-layout.component.ts | TypeScript |
ArrowFunction |
(): void => {
DThemeWhite.set("DInputTextArea", DThemeWhiteInputTextArea);
} | winter-cardinal/winter-cardinal-ui | src/main/typescript/wcardinal/ui/theme/white/load/load-theme-white-input-text-area.ts | TypeScript |
ArrowFunction |
() => {
it('should pass a value if it is a string already', () => {
expect(toString(MOCKS.stringEmptyMock)).toBe(MOCKS.stringEmptyMock);
expect(toString(MOCKS.stringLatinMock)).toBe(MOCKS.stringLatinMock);
});
it('should map undefined value as literal undefined string', () => {
expect(toString(MOCKS... | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.stringEmptyMock)).toBe(MOCKS.stringEmptyMock);
expect(toString(MOCKS.stringLatinMock)).toBe(MOCKS.stringLatinMock);
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.undefinedMock)).toBe('undefined');
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.nullMock)).toBe('null');
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.number0Mock)).toBe(MOCKS.number0Mock.toString());
expect(toString(MOCKS.number42Mock)).toBe(MOCKS.number42Mock.toString());
expect(toString(MOCKS.number42p525Mock)).toBe(MOCKS.number42p525Mock.toString());
expect(toString(MOCKS.numberMinus42Mock)).toBe(MOCKS.numberMinus42M... | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.undefinedMock, { useToJSON: true })).toBe(MOCKS.undefinedMock);
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.nullMock, { useToJSON: true })).toBe('null');
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
expect(toString(MOCKS.objectFooBarMock, { useToJSON: true })).toBe(
JSON.stringify(MOCKS.objectFooBarMock)
);
} | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ArrowFunction |
() => {
const toStringHandlerArgs: any[] = [16];
expect(toString(MOCKS.number42Mock, { handlerArgs: toStringHandlerArgs })).toBe(
MOCKS.number42Mock.toString(16)
);
const toJSONHandlerArgs: any[] = [null, 2];
expect(
toString(MOCKS.objectFooBarMock, {
handlerArgs: toJSONHandl... | icmx/nukit | src/mappers/toString/index.test.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class ResourcesService {
constructor(
@InjectRepository(Resource)
private resourceRepository: Repository<Resource>
) {}
create(createResourceDTO: CreateResourceDTO): Promise<Resource> {
const resource = new Resource();
resource._id = createResourceDTO.... | cjlaflamme1/Ascent-Sobriety-Mobile | server/src/resources/resources.service.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.