type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(x, y) => x + y * step | ggascoigne/acnw2 | src/utils/range.ts | TypeScript |
ArrowFunction |
(end: number, start = 0, step = 1) => {
function* generateRange() {
let x = start - step
while (x < end - step) yield (x += step)
}
return {
[Symbol.iterator]: generateRange,
}
} | ggascoigne/acnw2 | src/utils/range.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class PagesRoutingModule {
} | sanket-deepsource/orb | ui/src/app/pages/pages-routing.module.ts | TypeScript |
FunctionDeclaration |
function monitorWindowResize () {
// I can't use forwardref in class based components
// Header still is a class component
// FIXME: use a forwardRef when available
const header = headerRef.current.headerRef
function onWindowResize () {
state.updateWindowDimensions({
wi... | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function onWindowResize () {
state.updateWindowDimensions({
windowWidth: window.innerWidth,
windowHeight: window.innerHeight,
})
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function onNavItemClick (index: number) {
if (activeIndex !== index) {
return setActiveIndex(index)
}
setActiveIndex(undefined)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function toggleSpecsList () {
setActiveIndex((val) => val === 0 ? undefined : 0)
const newVal = !props.state.isSpecsListOpen
state.setIsSpecsListOpen(newVal)
props.eventManager.saveState({ ctIsSpecsListOpen: newVal })
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function focusSpecsList () {
setActiveIndex(0)
state.setIsSpecsListOpen(true)
// a little trick to focus field on the next tick of event loop
// to prevent the handled keydown/keyup event to fill input with "/"
setTimeout(() => {
searchRef.current?.focus()
}, 0)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function onReporterSplitPaneChange (newWidth: number) {
state.updateReporterWidth(newWidth)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function onPluginsSplitPaneChange (newHeight: number) {
state.updatePluginsHeight(newHeight)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function onSpecListPaneChange (newWidth: number) {
state.updateSpecListWidth(newWidth)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function persistWidth (prop: 'ctReporterWidth' | 'ctSpecListWidth') {
return (newWidth: number) => {
props.eventManager.saveState({ [prop]: newWidth })
}
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function hideIfScreenshotting (callback: () => number) {
if (state.screenshotting) {
return 0
}
return callback()
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function hideReporterIfNecessary (callback: () => number) {
if (state.screenshotting || !state.spec) {
return 0
}
return callback()
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
FunctionDeclaration |
function hideSpecsListIfNecessary () {
if (state.screenshotting || !props.state.isSpecsListOpen) {
return true
}
return false
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(file: FileNode) => {
setActiveIndex(0)
state.setSingleSpec(props.state.specs.find((spec) => spec.absolute.includes(file.absolute)))
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(spec) => spec.absolute.includes(file.absolute) | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => {
if (pluginRootContainer.current) {
state.initializePlugins(config, pluginRootContainer.current)
}
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => {
monitorWindowResize()
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => {
if (config.isTextTerminal) {
state.setIsSpecsListOpen(false)
}
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
({ index }) => {
onNavItemClick(index)
const isOpen = !props.state.isSpecsListOpen
state.setIsSpecsListOpen(isOpen)
props.eventManager.saveState({ ctIsSpecsListOpen: isOpen })
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
({ event, index }) => {
if (!event.currentTarget || !event.currentTarget.href) {
return
}
event.preventDefault()
props.eventManager.reporterBus.emit('external:open', event.currentTarget.href)
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(val) => val === 0 ? undefined : 0 | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => {
searchRef.current?.focus()
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => toggleSpecsList() | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(newWidth: number) => {
props.eventManager.saveState({ [prop]: newWidth })
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(props) => <div>{props.children}</div> | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => 100 | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => 600 | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
() => state.reporterWidth | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
ArrowFunction |
(spec) => spec.relative.toLowerCase().includes(search.toLowerCase()) | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
InterfaceDeclaration |
interface AppProps {
state: State
eventManager: typeof EventManager
config: Cypress.RuntimeConfigOptions
} | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
hideIfScreenshotting( | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
persistWidth('ctSpecListWidth') | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
cs('primary', { 'isSpecsListClosed': !state | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
debounce(onSpecListPaneChange) | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
cs(styles | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
MethodDeclaration |
debounce(onPluginsSplitPaneChange) | ben8p/cypress | packages/runner-ct/src/app/RunnerCt.tsx | TypeScript |
InterfaceDeclaration | // Interfaz de Usuarios
interface IUser {
id: number;
name: string;
username: string;
email: string;
} | CIFP-Virgen-de-Gracia/vue-rest-ts | src/interfaces/IUser.ts | TypeScript |
ArrowFunction |
() => {
describe('constructor', () => {
it('creates store with primary index', () => {
let storage = new IndexedStore<Person>();
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
storage = new IndexedStore<Person>({ indexes: [] });
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
});
... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
it('creates store with primary index', () => {
let storage = new IndexedStore<Person>();
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
storage = new IndexedStore<Person>({ indexes: [] });
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
});
it('creates store with secondary ... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
let storage = new IndexedStore<Person>();
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
storage = new IndexedStore<Person>({ indexes: [] });
expect(storage.indexes).to.be.equalTo([PK_INDEX_NAME]);
} | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
const indexes: Array<string> = Object.values(PersonIndexes);
const storage = new IndexedStore<Person>({ indexes });
expect(storage.indexes).to.be.containingAllOf(indexes.concat([PK_INDEX_NAME]));
} | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should return no values when storage is empty', () => {
const storage = new IndexedStore<Person>();
expect(storage.values.length).to.be.eq(0);
});
it('should return all values from storage', () => {
const indexes = Object.values(PersonIndexes);
const storage = new IndexedStore<Person>({ ... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
const storage = new IndexedStore<Person>();
expect(storage.values.length).to.be.eq(0);
} | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
const indexes = Object.values(PersonIndexes);
const storage = new IndexedStore<Person>({ indexes });
storage.insert(PersonsRepo);
expect(storage.size).to.be.eq(PersonsRepo.length);
expect(storage.values.length).to.be.eq(storage.size);
expect(storage.values).to.be.containingAllOf(PersonsRepo)... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should iterate over no records when storage is empty', () => {
const storage = new IndexedStore<Person>();
let counter = 0;
for (const _ of storage) {
counter += 1;
}
expect(counter).to.be.eq(0);
});
it('should iterate over all records from storage', () => {
const indexes = Obj... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
const storage = new IndexedStore<Person>();
let counter = 0;
for (const _ of storage) {
counter += 1;
}
expect(counter).to.be.eq(0);
} | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
() => {
const indexes = Object.values(PersonIndexes);
const storage = new IndexedStore<Person>({ indexes });
storage.insert(PersonsRepo);
expect(storage.size).to.be.eq(PersonsRepo.length);
const iterated = new Set<Person>();
for (const record of storage) {
iterated.add(record);
}
expect(it... | marinrusu1997/thermopylae | packages/lib.indexed-store/test/index.spec.ts | TypeScript |
ArrowFunction |
(Standard: 15714 oder Testnetz: 25714) | nibblewibble/Blackhole | src/qt/locale/bitcoin_de.ts | TypeScript |
ArrowFunction |
(Standard: 15715 or Testnetz: 25715) | nibblewibble/Blackhole | src/qt/locale/bitcoin_de.ts | TypeScript |
ClassDeclaration |
export class Empty implements ReadonlyHost {
readonly capabilities: HostCapabilities = {
synchronous: true,
};
read(path: Path): Observable<FileBuffer> {
return throwError(new FileDoesNotExistException(path));
}
list(path: Path): Observable<PathFragment[]> {
return of([]);
}
exists(path: P... | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
read(path: Path): Observable<FileBuffer> {
return throwError(new FileDoesNotExistException(path));
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
list(path: Path): Observable<PathFragment[]> {
return of([]);
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
exists(path: Path): Observable<boolean> {
return of(false);
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
isDirectory(path: Path): Observable<boolean> {
return of(false);
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
isFile(path: Path): Observable<boolean> {
return of(false);
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
MethodDeclaration |
stat(path: Path): Observable<Stats<{}> | null> {
// We support stat() but have no file.
return of(null);
} | 216Giorgiy/angular-cli | packages/angular_devkit/core/src/virtual-fs/host/empty.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [UtilsModule],
providers: [XlsxWriterService],
exports: [XlsxWriterService],
})
export class XlsxWriterModule {} | Rus-tam/report-generator | src/xlsx-writer/xlsx-writer.module.ts | TypeScript |
ArrowFunction |
props => {
const { size, withHoverEffect, color, margin, ...restProps } = props;
return (
<SvgIcon {...{ size, withHoverEffect, color, margin, ...restProps }}>
<GeneralInformation390LineIconSvg {...restProps} width="1em" height="1em" />
</SvgIcon> | AbhijitHycinth/medly-components | packages/icons/src/icons/GSDD/GeneralInformation390LineIcon.tsx | TypeScript |
ArrowFunction |
u =>
u
.combine('storageClass', ['uniform', 'storage_r', 'storage_rw'] as const)
.combine('vectorize', [undefined, 2, 3, 4] as const) | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
async t => {
// [1]: Need to decide what the ground-truth is.
const makeCase = (y: number, x: number): Case => {
assert(x !== 0, 'atan2 is undefined for x = 0');
return { input: [f32(y), f32(x)], expected: f32(Math.atan2(y, x)) };
};
const numeric_range = fullF32Range({
neg_norm: 100... | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
(y: number, x: number): Case => {
assert(x !== 0, 'atan2 is undefined for x = 0');
return { input: [f32(y), f32(x)], expected: f32(Math.atan2(y, x)) };
} | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
x => {
return x !== 0;
} | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
x => makeCase(0.0, x) | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
(y, y_idx) => {
numeric_range.forEach((x, x_idx) => {
if (x_idx >= y_idx) {
cases.push(makeCase(y, x));
}
});
} | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
ArrowFunction |
(x, x_idx) => {
if (x_idx >= y_idx) {
cases.push(makeCase(y, x));
}
} | reeselevine/cts | src/webgpu/shader/execution/expression/call/builtin/atan2.spec.ts | TypeScript |
TypeAliasDeclaration |
type BlockPoolDashboardContext = {
obj: StoragePoolKind;
}; | DaoDaoNoCode/console | frontend/packages/ceph-storage-plugin/src/components/dashboards/block-pool/block-pool-dashboard-context.tsx | TypeScript |
ClassDeclaration |
@Module({
imports: [TypeOrmModule.forFeature([Post])],
controllers: [PostsController],
providers: [PostsService]
})
export class PostsModule {} | nicaciobrasilfone/nest-crud | src/posts/posts.module.ts | TypeScript |
TypeAliasDeclaration |
export declare type HasColumn<ColumnMapT extends ColumnMap, ColumnT extends IColumn> = (keyof ColumnMapT extends never ? false : ColumnMap extends ColumnMapT ? boolean : string extends ColumnT["name"] ? (string extends ColumnT["tableAlias"] ? (ReturnType<ColumnT["assertDelegate"]> extends ReturnType<ColumnUtil.FromCol... | AnyhowStep/typed-orm | dist/src/main/v3/column-map/util/predicate/has-column.d.ts | TypeScript |
FunctionDeclaration |
export default function ProductList() {
const classes = useStyles();
const [products, setProducts] = useState<Product[]>([]);
const [previousCategoryId, setPreviousCategoryId] = useState<number>(0);
const [isLoading, setIsLoading] = useState<boolean>(false);
const [error, setError] = useState<Error | null>(n... | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
(theme) => ({
paper: {
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
},
root: {
maxWidth: 345,
},
media: {
height: 140,
},
}) | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
() => {
if (!isLoading && categoryId > 0 && previousCategoryId !== categoryId) {
setIsLoading(true);
setError(null);
client.listProductByCategory(categoryId)
.then(response => response.json())
.then(response => {
if (Array.isArray(response)) {
const newProduc... | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
response => {
if (Array.isArray(response)) {
const newProducts: Product[] = response.map(product => new Product(
product.id,
product.categoryId,
product.name,
product.description,
product.photo,
product.price,
... | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
product => new Product(
product.id,
product.categoryId,
product.name,
product.description,
product.photo,
product.price,
) | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
error => {
setProducts([]);
setError(error)
} | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
() => {
setIsLoading(false);
setPreviousCategoryId(categoryId);
} | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
(productId: number) => {
dispatch(new Action(ActionType.AddToCart, productId));
client.addProductToCart(cartId, productId)
.then(response => {
if (response.ok) {
enqueueSnackbar('Product is added to cart', {
autoHideDuration: 3000,
variant: 'success',
... | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
response => {
if (response.ok) {
enqueueSnackbar('Product is added to cart', {
autoHideDuration: 3000,
variant: 'success',
preventDuplicate: true,
})
} else {
enqueueSnackbar('Failed when adding to cart', {
autoHideDuration: ... | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
error => {
enqueueSnackbar('Sorry, something is broken', {
autoHideDuration: 3000,
variant: 'error',
preventDuplicate: true,
})
} | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
() => {
dispatch(new Action(ActionType.MarkAsAdded, productId));
} | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
product => (
<Grid item | gifff/XenElectronic | web/src/pages/ProductList/index.tsx | TypeScript |
ArrowFunction |
menus => this.menus = menus | xandercj/angular | appHealhtyFood/src/app/menus/menus.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-menus',
templateUrl: './menus.component.html',
styleUrls: ['./menus.component.css']
})
export class MenusComponent implements OnInit {
menus: Menu[];
selectedMenu: Menu;
constructor(private menuService: MenuService) { }
ngOnInit() {
this.getMenus();
}
onSelect(... | xandercj/angular | appHealhtyFood/src/app/menus/menus.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.getMenus();
} | xandercj/angular | appHealhtyFood/src/app/menus/menus.component.ts | TypeScript |
MethodDeclaration |
onSelect(menu: Menu): void {
this.selectedMenu = menu;
} | xandercj/angular | appHealhtyFood/src/app/menus/menus.component.ts | TypeScript |
MethodDeclaration |
getMenus(): void {
this.menuService.getMenus().subscribe(menus => this.menus = menus);
} | xandercj/angular | appHealhtyFood/src/app/menus/menus.component.ts | TypeScript |
ArrowFunction |
() => {
it('should create an instance', () => {
let component = new IconsfontComponent();
expect(component).toBeTruthy();
});
} | asushiye/dfitness | ng2angle/src/app/routes/elements/iconsfont/iconsfont.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let component = new IconsfontComponent();
expect(component).toBeTruthy();
} | asushiye/dfitness | ng2angle/src/app/routes/elements/iconsfont/iconsfont.component.spec.ts | TypeScript |
FunctionDeclaration |
export async function createReviewComment(reviewId: string, body: CreateDto) {
const stringValidator: StringValidator = new StringValidator();
stringValidator.validate(reviewId, 'reviewId');
const createValidator: CreateValidator = new CreateValidator();
createValidator.validate(body, 'body');
if (Config.m... | allofshop/aos-sdk | packages/aos-sdk-nodejs/src/review/reviewComment/reviewComment.ts | TypeScript |
FunctionDeclaration |
export async function getReviewComment(reviewId: string, commentId: string) {
const stringValidator: StringValidator = new StringValidator();
stringValidator.validate(reviewId, 'reviewId');
stringValidator.validate(commentId, 'commentId');
if (Config.mode === 'DEVELOPMENT') {
console.log(`[DEVELOPMENT]: `... | allofshop/aos-sdk | packages/aos-sdk-nodejs/src/review/reviewComment/reviewComment.ts | TypeScript |
FunctionDeclaration |
export async function updateReviewComment(
reviewId: string,
commentId: string,
body: UpdateOneByIdDto
) {
const stringValidator: StringValidator = new StringValidator();
stringValidator.validate(reviewId, 'reviewId');
stringValidator.validate(commentId, 'commentId');
const updateOneByIdValidator: Updat... | allofshop/aos-sdk | packages/aos-sdk-nodejs/src/review/reviewComment/reviewComment.ts | TypeScript |
FunctionDeclaration |
export async function deleteReviewComment(reviewId: string, commentId: string) {
const stringValidator: StringValidator = new StringValidator();
stringValidator.validate(reviewId, 'reviewId');
stringValidator.validate(commentId, 'commentId');
if (Config.mode === 'DEVELOPMENT') {
console.log(`[DEVELOPMENT]... | allofshop/aos-sdk | packages/aos-sdk-nodejs/src/review/reviewComment/reviewComment.ts | TypeScript |
FunctionDeclaration | //TODO: 서버 Dto에서 query가 비어있음
export async function getReviewComments(reviewId: string, query: any) {
const stringValidator: StringValidator = new StringValidator();
stringValidator.validate(reviewId, 'reviewId');
return await lite.request(
'GET',
`reviews/${reviewId}/comments`,
{ content: 'json' },
... | allofshop/aos-sdk | packages/aos-sdk-nodejs/src/review/reviewComment/reviewComment.ts | TypeScript |
ArrowFunction |
result => {
if (!result) {
this.setValue(key, oldValue, { emitEvent: false });
}
} | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
ArrowFunction |
(opt, i) => {
if (opt.value || opt.label) {
if (opt.value === optionToRemove || opt.label === optionToRemove) {
index = i;
}
} else {
... | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
ArrowFunction |
(opt, i) => {
if (opt.value || opt.label) {
if (opt.value === optionToRemove || opt.label === optionToRemove) {
index = i;
}
} else {
if (opt === optionToRemove) {
... | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
ArrowFunction |
(query) => {
if (config.optionsPromise) {
return config.optionsPromise(query, this.http);
}
return new Promise((resolve, reject) => {
let url = config.optionsUrlBuilder ? config.optionsUrlBui... | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
let url = config.optionsUrlBuilder ? config.optionsUrlBuilder(query) : `${config.optionsUrl}?filter=${query || ''}`;
if (query && query.length) {
this.http
.get(url)
... | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
ArrowFunction |
res => {
if (res.json) {
return res.json();
}
return res;
} | ezrashim/novo-elements | src/platform/elements/form/FieldInteractionApi.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.