type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(event: Event) => {
const cell = this.spreadsheet.getCell(event.target) as S2CellType;
if (isEmpty(cell)) return;
this.spreadsheet.interaction.changeState({
cells: [getCellMeta(cell)],
stateName: InteractionStateName.HOVER,
});
cell.updateByState(InteractionStateName.UNSEL... | PerkinJ/S2 | packages/s2-react/__tests__/spreadsheet/custom/custom-interaction.tsx | TypeScript |
ArrowFunction |
(spreadsheet: SpreadSheet) =>
new CustomHover(spreadsheet) | PerkinJ/S2 | packages/s2-react/__tests__/spreadsheet/custom/custom-interaction.tsx | TypeScript |
ClassDeclaration |
export class CustomHover extends BaseEvent {
public bindEvents() {
this.bindDataCellHover();
}
private bindDataCellHover() {
this.spreadsheet.on(S2Event.DATA_CELL_HOVER, (event: Event) => {
const cell = this.spreadsheet.getCell(event.target) as S2CellType;
if (isEmpty(cell)) return;
th... | PerkinJ/S2 | packages/s2-react/__tests__/spreadsheet/custom/custom-interaction.tsx | TypeScript |
MethodDeclaration |
public bindEvents() {
this.bindDataCellHover();
} | PerkinJ/S2 | packages/s2-react/__tests__/spreadsheet/custom/custom-interaction.tsx | TypeScript |
MethodDeclaration |
private bindDataCellHover() {
this.spreadsheet.on(S2Event.DATA_CELL_HOVER, (event: Event) => {
const cell = this.spreadsheet.getCell(event.target) as S2CellType;
if (isEmpty(cell)) return;
this.spreadsheet.interaction.changeState({
cells: [getCellMeta(cell)],
stateName: Interactio... | PerkinJ/S2 | packages/s2-react/__tests__/spreadsheet/custom/custom-interaction.tsx | TypeScript |
ArrowFunction |
(預設值: | annurdien/Slemanium | src/qt/locale/slemanium_zh_TW.ts | TypeScript |
ArrowFunction |
(預設值: 0 表示不修剪區塊,1 表示允許使用 RPC 指令做修剪,> | annurdien/Slemanium | src/qt/locale/slemanium_zh_TW.ts | TypeScript |
ArrowFunction |
(預設值: 跟所有網路界面上的位址繫結) | annurdien/Slemanium | src/qt/locale/slemanium_zh_TW.ts | TypeScript |
ClassDeclaration |
export class GetTasksFilterDto {
status: taskStatus;
search: string;
} | chandrakantsavant/nestjs-task-management | src/tasks/dto/get-tasks-filter.dto.ts | TypeScript |
ArrowFunction |
() => {
const { publicKey } = useWallet();
const { whitelistedCreatorsByCreator, store } = useMeta();
const pubkey = publicKey?.toBase58() || '';
const canCreate = useMemo(() => {
return (
store?.info?.public ||
whitelistedCreatorsByCreator[pubkey]?.info?.activated
);
}, [pubkey, whiteli... | damodharanj/eco-engineers | js/packages/web/src/components/AppBar/index.tsx | TypeScript |
ArrowFunction |
() => {
return (
store?.info?.public ||
whitelistedCreatorsByCreator[pubkey]?.info?.activated
);
} | damodharanj/eco-engineers | js/packages/web/src/components/AppBar/index.tsx | TypeScript |
ArrowFunction |
({ vertical = false }: { vertical?: boolean }) => {
const { connected } = useWallet();
return (
<div
style={{
display: 'flex',
flexDirection: vertical ? 'column' : 'row',
}} | damodharanj/eco-engineers | js/packages/web/src/components/AppBar/index.tsx | TypeScript |
ArrowFunction |
() => {
const { width } = useWindowDimensions();
const { connected } = useWallet();
if (width < 768)
return (
<>
<Dropdown
arrow
placement="bottomLeft"
trigger={['click']}
overlay={
<Menu>
<Menu.Item>
<Link to={`... | damodharanj/eco-engineers | js/packages/web/src/components/AppBar/index.tsx | TypeScript |
ArrowFunction |
() => {
const { connected } = useWallet();
return (
<>
<div className="app-left app-bar-box">
{window.location.hash !== '#/analytics' && <Notifications />}
<div className="divider" />
<MetaplexMenu />
</div>
{connected ? (
<div className="app-right app-bar-box... | damodharanj/eco-engineers | js/packages/web/src/components/AppBar/index.tsx | TypeScript |
ArrowFunction |
(action$, store) => action$.ofAction(createEditorTab.started)
.map(action => {
const state = store.getState();
const ids = state.editor.tabs
.filter(l => l.new)
.map(l => l.id)
.sort();
const id = (ids.length ? parseInt(ids[ids.length - 1], 10)... | ewetdans/weaver | src/app/modules/editor/epics/createEditorTabEpic.ts | TypeScript |
ArrowFunction |
action => {
const state = store.getState();
const ids = state.editor.tabs
.filter(l => l.new)
.map(l => l.id)
.sort();
const id = (ids.length ? parseInt(ids[ids.length - 1], 10) + 1 : 1).toString();
switch (action.payload) {
... | ewetdans/weaver | src/app/modules/editor/epics/createEditorTabEpic.ts | TypeScript |
ArrowFunction |
l => l.new | ewetdans/weaver | src/app/modules/editor/epics/createEditorTabEpic.ts | TypeScript |
ArrowFunction |
l => l.id | ewetdans/weaver | src/app/modules/editor/epics/createEditorTabEpic.ts | TypeScript |
ArrowFunction |
() => (
<svg height="24" | caseykennedy/eon | web/src/components/Icons/SVG/Envelope.tsx | TypeScript |
ArrowFunction |
()=>String | LeonardoRiosvlz/Shunchine | src/shared/modules/user/modules/user-area/graphql/dto/inputs/user-area-filter.input.ts | TypeScript |
ArrowFunction |
()=>Boolean | LeonardoRiosvlz/Shunchine | src/shared/modules/user/modules/user-area/graphql/dto/inputs/user-area-filter.input.ts | TypeScript |
ArrowFunction |
()=>Date | LeonardoRiosvlz/Shunchine | src/shared/modules/user/modules/user-area/graphql/dto/inputs/user-area-filter.input.ts | TypeScript |
ClassDeclaration |
@ObjectType()
export class UserAreaFilter implements IEntityFilter<UserAreaEntity>{
@FilterableField(()=>String, { nullable: true }) id?: string;
@FilterableField(()=>String, { nullable: true }) name?: string;
@FilterableField(()=>String, { nullable: true}) description?: string;
@FilterableField(()=>Boolean, {... | LeonardoRiosvlz/Shunchine | src/shared/modules/user/modules/user-area/graphql/dto/inputs/user-area-filter.input.ts | TypeScript |
ArrowFunction |
() => {
let app: INestApplication;
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).overrideProvider(ChannelsService).useValue({}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
it('/ ... | shortnd/hymnal-server-v2 | test/app.e2e.spec.ts | TypeScript |
ArrowFunction |
async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).overrideProvider(ChannelsService).useValue({}).compile();
app = moduleFixture.createNestApplication();
await app.init();
} | shortnd/hymnal-server-v2 | test/app.e2e.spec.ts | TypeScript |
ArrowFunction |
() => {
return request(app.getHttpServer())
.get('/')
.expect(200)
.expect('Hello World!');
} | shortnd/hymnal-server-v2 | test/app.e2e.spec.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-migration-factory',
templateUrl: './migration-factory.component.html',
styleUrls: ['./migration-factory.component.css']
})
export class MigrationFactoryComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
} | pavanpsanu/mbuportal1 | src/app/migration-factory/migration-factory.component.ts | TypeScript |
ArrowFunction |
(): PostgresOptions => ({
host: toEnvString('PGHOST', 'localhost'),
port: toEnvNumber('PGPORT', 5432),
database: toEnvString('PGDATABASE', 'felt'),
username: toEnvString('PGUSERNAME', toEnvString('PGUSER', 'postgres')),
password: toEnvString('PGPASSWORD', 'password'),
idle_timeout: toEnvNumber('PGIDLE_TIMEOUT'),... | feltcoop/felt-server | src/lib/db/postgres.ts | TypeScript |
InterfaceDeclaration | // was using a type helper here, but worsens usage because of the complexity
export interface PostgresOptions extends Options<PostgresTypeMap> {
host: string;
port: number;
database: string;
username: string;
password: string;
} | feltcoop/felt-server | src/lib/db/postgres.ts | TypeScript |
TypeAliasDeclaration | // Postgres.js - PostgreSQL client for Node.js
// https://github.com/porsager/postgres
export type PostgresSql = Sql<PostgresTypeMap>; | feltcoop/felt-server | src/lib/db/postgres.ts | TypeScript |
TypeAliasDeclaration | // TODO use this to pass through custom types
export type PostgresTypeMap = Record<string, unknown>; | feltcoop/felt-server | src/lib/db/postgres.ts | TypeScript |
ClassDeclaration |
export abstract class SharpBaseContent implements AttachmentContent {
abstract readRawContent(rawData: any): void;
abstract toRawContent(): any;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export abstract class SharpContent extends SharpBaseContent {
abstract readRawContent(rawData: any): void;
abstract toRawContent(): any;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export abstract class SharpFragment extends SharpBaseContent {
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpImageFragment extends SharpFragment {
constructor(
public ImageURL: string = '',
public ImageWidth: number = -1,
public ImageHeight: number = -1
) {
super();
}
readRawContent(rawData: any) {
this.ImageURL = rawData['I'] || '';
this.Ima... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpTextFragment extends SharpFragment {
constructor(
public Text: string = '',
public Description: string = ''
) {
super();
}
readRawContent(rawData: any) {
this.Text = rawData['T'] || '';
this.Description = rawData['DE'] || '';
}
toRawCo... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpButtonFragment extends SharpFragment {
constructor(
public Text: string = '',
public RedirectLink: string = '',
public Icon: string = '' //Currently only 'more'
) {
super();
}
readRawContent(rawData: any) {
this.Text = rawData['T'] || '';
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpAttachment implements ChatAttachment {
constructor(
public Question: string = '',
public RedirectURL: string = '',
public ContentType: SharpContentType = SharpContentType.NONE,
public ContentList: SharpContent[] = [],
public MainImage?: SharpImageFragment,... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpButtonListContent extends SharpContent {
constructor(
public ButtonList?: SharpButtonFragment[],
) {
super();
}
readRawContent(rawData: any) {
if (rawData['BU']) {
this.ButtonList = [];
for (let rawBtn of rawData['BU']) {
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpImageContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public Text?: SharpTextFragment,
public InfoText: string = '',
public Image?: SharpImageFragment,
) {
super();
}
readRawContent(rawData: any) {
if (rawDa... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpWeatherFragment extends SharpFragment {
constructor(
public Icon: WeatherIcon = WeatherIcon.CLEAR,
public Text: SharpTextFragment = new SharpTextFragment(),
public Temperature: string = ''
) {
super();
}
readRawContent(rawData: any): void {
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpWeatherContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public InfoText: string = '',
public Place: string = '',
public LastUpdate: string = '',
public MainWeather: SharpWeatherFragment[] = [],
public SubWeather: SharpWe... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpSimpleContent extends SharpFragment {
constructor(
public RedirectURL: string = '',
public Text: string = '', //HTML partially Supported
public InfoText: string = ''
) {
super();
}
readRawContent(rawData: any) {
this.Text = rawData['T'];
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpMediaContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public Text?: SharpTextFragment,
public InfoText: string = '',
public ExtraInfoList: SharpTextFragment[] = [],
public Image?: SharpImageFragment,
) {
super();
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpMovieContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public Text?: SharpTextFragment,
public InfoText: string = '',
public StarRate: string = '',
public ExtraInfoList: SharpTextFragment[] = [],
public ImageList: SharpIm... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpRankContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public Text?: SharpTextFragment,
public StarRate: string = '',
public Rank: string = '',
public Image?: SharpImageFragment
) {
super();
}
readRawContent(r... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ClassDeclaration |
export class SharpVideoContent extends SharpContent {
constructor(
public RedirectURL: string = '',
public Text?: SharpTextFragment,
public InfoText: string = '',
public PlayTime: number = 0,
public Image?: SharpImageFragment
) {
super();
}
readRawConte... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
EnumDeclaration |
export enum SharpContentType {
NONE = '',
LIST = 'list',
IMAGE = 'image',
VIDEO_CLIP = 'vclip',
WEATHER = 'weather',
MOVIE = 'movie',
MEDIA = 'media',
RANK = 'rank',
SIMPLE = 'simple'
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
EnumDeclaration |
export enum WeatherIcon {
CLEAR = '01',
SUN_SILGHTLY_CLOUDY = '02',
SUN_CLOUDY = '03',
CLOUDY = '04',
SUN_WITH_CLOUD = '05',
SUN_CLOUDY_2 = '06',
RAIN = '07',
CLOUD_RAIN = '08',
RAIN_UMBRELLA = '09',
LITTLE_RAIN = '10',
SNOW = '11',
CLOUD_SNOW = '12',
CLOUD_SUN_SNOW... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
abstract readRawContent(rawData: any): void; | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
abstract toRawContent(): any; | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
this.ImageURL = rawData['I'] || '';
this.ImageWidth = rawData['W'] || -1;
this.ImageHeight = rawData['H'] || -1;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'I': this.ImageURL
}
if (this.ImageWidth !== -1) {
obj['W'] = this.ImageWidth;
}
if (this.ImageHeight !== -1) {
obj['H'] = this.ImageHeight;
}
return obj;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
this.Text = rawData['T'] || '';
this.Description = rawData['DE'] || '';
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'T': this.Text
}
if (this.Description !== '') {
obj['DE'] = this.Description;
}
return obj;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
this.Text = rawData['T'] || '';
this.RedirectLink = rawData['L'] || '';
this.Icon = rawData['TP'] || '';
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'T': this.Text
}
if (this.RedirectLink !== '') {
obj['L'] = this.RedirectLink;
}
if (this.Icon !== '') {
obj['TP'] = this.Icon;
}
return obj;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readAttachment(rawJson: any): void {
this.Question = rawJson['Q'];
this.ContentType = rawJson['V'] || SharpContentType.NONE;
if (rawJson['I']) {
this.MainImage = new SharpImageFragment();
this.MainImage.readRawContent(rawJson);
}
this.RedirectURL = raw... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toJsonAttachment() {
let obj: any = {
'Q': this.Question,
'V': this.ContentType,
'L': this.RedirectURL
};
if (this.MainImage) {
Object.assign(obj, this.MainImage.toRawContent());
}
if (this.ContentList.length > 0) {
l... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['BU']) {
this.ButtonList = [];
for (let rawBtn of rawData['BU']) {
let btn = new SharpButtonFragment();
btn.readRawContent(rawBtn);
this.ButtonList.push(btn);
}
}
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let list: any = [];
if (this.ButtonList) {
for (let btn of this.ButtonList) {
list.push(btn.toRawContent());
}
} else {
return {};
}
return {
'BU': list
};
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['T']) {
this.Text = new SharpTextFragment();
this.Text.readRawContent(rawData);
}
this.InfoText = rawData['D'];
this.RedirectURL = rawData['L'];
if (rawData['I']) {
this.Image = new SharpImageFragm... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.InfoText !== '') {
obj['D'] = this.InfoText;
}
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
if (this.Image) {
Object.as... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any): void {
if (rawData['T']) {
this.Text.readRawContent(rawData);
}
this.Icon = rawData['IC'];
this.Temperature = rawData['TE'];
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent() {
let obj: any = {
'IC': this.Icon
};
if (this.Temperature !== '') {
obj['TE'] = this.Temperature;
}
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
return obj;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
this.InfoText = rawData['D'];
this.RedirectURL = rawData['L'];
this.Place = rawData['PL'];
this.LastUpdate = rawData['TM'];
if (rawData['MA']) {
this.MainWeather = [];
for (let raw of rawData['MA']) {
let... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.Place !== '') {
obj['PL'] = this.Place;
}
if (this.LastUpdate !== '') {
obj['TM'] = this.LastUpdate;
}
if (this.InfoText !== '') {
obj['D']... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
this.Text = rawData['T'];
this.InfoText = rawData['D'];
this.RedirectURL = rawData['L'];
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.InfoText !== '') {
obj['D'] = this.InfoText;
}
if (this.Text !== '') {
obj['T'] = this.Text;
}
return obj;
} | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['T']) {
this.Text = new SharpTextFragment();
this.Text.readRawContent(rawData);
}
if (rawData['DL']) {
this.ExtraInfoList = [];
for (let rawText of rawData['DL']) {
if (!rawText) continu... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.InfoText !== '') {
obj['D'] = this.InfoText;
}
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
if (this.Image) {
Object.as... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['T']) {
this.Text = new SharpTextFragment();
this.Text.readRawContent(rawData);
}
this.InfoText = rawData['D'];
this.RedirectURL = rawData['L'];
if (rawData['IL']) {
this.ImageList = [];
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.InfoText !== '') {
obj['D'] = this.InfoText;
}
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
if (this.ImageList.length > 0) {
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['T']) {
this.Text = new SharpTextFragment();
this.Text.readRawContent(rawData);
}
this.RedirectURL = rawData['L'];
if (rawData['I']) {
this.Image = new SharpImageFragment();
this.Image.readRawC... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL
};
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
if (this.Image) {
Object.assign(obj, this.Image.toRawContent());
}
if (this.Rank !== '') {
... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
readRawContent(rawData: any) {
if (rawData['T']) {
this.Text = new SharpTextFragment();
this.Text.readRawContent(rawData);
}
this.InfoText = rawData['D'];
this.PlayTime = rawData['PT'] || 0;
if (rawData['I']) {
this.Image = new SharpImageFr... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
MethodDeclaration |
toRawContent(): any {
let obj: any = {
'L': this.RedirectURL,
'PT': this.PlayTime
};
if (this.InfoText !== '') {
obj['D'] = this.InfoText;
}
if (this.Text) {
Object.assign(obj, this.Text.toRawContent());
}
if (th... | JellyBrick/node-kakao | src/talk/chat/attachment/sharp-attachment.ts | TypeScript |
ArrowFunction |
({
token
}) => {
const classes = useStyles();
return (
<Paper className='fieldsetParent'>
<fieldset className={classes.container}>
<Typography component='legend' variant='h5' gutterBot... | tendomart/openmrs-ocl-client | src/apps/authentication/components/UserTokenDetails.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
token?: string;
} | tendomart/openmrs-ocl-client | src/apps/authentication/components/UserTokenDetails.tsx | TypeScript |
ClassDeclaration |
@Injectable()
export class UserService {
constructor(@InjectModel(User.name) private userModel: Model<UserDocument>) {}
createUser(personData: NationalIDQueryDto, phoneNumber: string, preferedLocation: Location) {
const genderEN = GenderEN.Female == personData.en.gender ? GenderEN.Female : GenderEN.MALE
const g... | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
createUser(personData: NationalIDQueryDto, phoneNumber: string, preferedLocation: Location) {
const genderEN = GenderEN.Female == personData.en.gender ? GenderEN.Female : GenderEN.MALE
const genderTH = GenderTH.Female == personData.th.gender ? GenderTH.Female : GenderTH.MALE
const user = new this.userModel({
... | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
findByID(userId: string) {
return this.userModel.findOne({ _id: userId }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
findLeanByID(userId: string) {
return this.userModel.findOne({ _id: userId }).lean().exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
findByNationalID(nationalID: string) {
return this.userModel.findOne({ nationalID }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
findByNationalIDAndVerified(nationalID: string) {
return this.userModel.findOne({ nationalID, isPhoneVerify: true }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
findByNationalIdAndPhone(nationalID: string, phoneNumber: string) {
return this.userModel.findOne({ nationalID, phoneNumber, isPhoneVerify: true }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
updateIsPhoneVerifyToTrue(userId: string) {
return this.userModel.updateOne({ _id: userId }, { isPhoneVerify: true }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
changePreferedLocation(userId: string, newLocation: LocationDocument) {
return this.userModel.updateOne({ _id: userId }, { preferedLocation: newLocation }).exec()
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
async getPreferedLocation(userId: string) {
const user = await this.userModel.findById(userId, 'preferedLocation').populate('preferedLocation').exec()
return user.preferedLocation
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
async getPreferedLocationWithoutDatetime(userId: string) {
const user = await this.userModel
.findById(userId, 'preferedLocation')
.populate('preferedLocation', ['_id', 'name_th', 'name_en', 'priority', 'province_th', 'province_en'])
.exec()
return user.preferedLocation
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
MethodDeclaration |
async changePhoneNumber(userId: string, newPhoneNumber: string) {
return this.userModel.findByIdAndUpdate(userId, { phoneNumber: newPhoneNumber })
} | MeVaccine/me-vaccine-backend | src/user/user.service.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'ex-custom',
templateUrl: './custom.component.html',
styleUrls: ['./custom.component.scss']
})
export class ExCustomComponent {} | NG-NEST/ng-nest | lib/ng-nest/ui/back-top/examples/en_US/default/custom/custom.component.ts | TypeScript |
FunctionDeclaration |
export default function NaeAuthLoginPage(props: Props) {
const { lang = 'en' } = props
const history = useHistory()
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const goToSignUp = () => {
history.push('/register')
}
const doLogin = () => {
NaeApiAuth.doLog... | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
ArrowFunction |
() => {
history.push('/register')
} | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
ArrowFunction |
() => {
NaeApiAuth.doLogin(email, password)
.then((res) => {
if (res.isError) {
alert(res.error.description)
return
}
window.localStorage.setItem('token', res.token)
history.push('/')
})
.catch((e) => alert(e.message))
} | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
ArrowFunction |
(res) => {
if (res.isError) {
alert(res.error.description)
return
}
window.localStorage.setItem('token', res.token)
history.push('/')
} | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
ArrowFunction |
(e) => alert(e.message) | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
lang?: string
} | newageerp/nae-react-auth | src/components/Auth/NaeAuthLoginPage.tsx | TypeScript |
FunctionDeclaration | /**
* Given a test function which sets the stage and verifies a dependency scenario
* between two CloudFormation resources, returns two tests which exercise both
* "construct dependency" (i.e. node.addDependency) and "resource dependency"
* (i.e. resource.addDependsOn).
*
* @param testFunction The test function
... | 1davidmichael/aws-cdk | packages/@aws-cdk/aws-cloudformation/test/test.deps.ts | TypeScript |
FunctionDeclaration |
function assertAssemblyDependency(test: Test, assembly: cxapi.CloudAssembly, stack: Stack, expectedDeps: string[]) {
const stack1Art = assembly.getStackArtifact(stack.artifactId);
const stack1Deps = stack1Art.dependencies.map(x => x.id);
test.deepEqual(stack1Deps, expectedDeps);
} | 1davidmichael/aws-cdk | packages/@aws-cdk/aws-cloudformation/test/test.deps.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.