type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
FunctionDeclaration |
function stopPollingRuntime() {
if (botStatusInterval) {
clearInterval(botStatusInterval);
botStatusInterval = undefined;
}
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
async function handlePublish(config: IPublishConfig) {
setBotStatus(BotStatus.publishing);
dismissDialog();
const { luis, qna } = config;
const endpointKey = settings.qna?.endpointKey;
await setSettings(projectId, {
...settings,
luis: luis,
qna: Object.assign({}, settings.qna, qna... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
async function handleLoadBot() {
setBotStatus(BotStatus.reloading);
if (settings.qna && settings.qna.subscriptionKey) {
await setQnASettings(projectId, settings.qna.subscriptionKey);
}
const sensitiveSettings = settingsStorage.get(projectId);
await publishToTarget(projectId, defaultPublishCon... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
function isConfigComplete(config) {
let complete = true;
if (getReferredLuFiles(luFiles, dialogs).length > 0) {
if (Object.values(LuisConfig).some((luisConfigKey) => config.luis[luisConfigKey] === '')) {
complete = false;
}
}
if (getReferredQnaFiles(qnaFiles, dialogs).length > 0) {
... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration | // return true if dialogs have one with default recognizer.
function needsPublish(dialogs) {
let isDefaultRecognizer = false;
if (dialogs.some((dialog) => typeof dialog.content.recognizer === 'string')) {
isDefaultRecognizer = true;
}
return isDefaultRecognizer;
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
async function handleStart() {
dismissCallout();
const config = Object.assign(
{},
{
luis: settings.luis,
qna: {
subscriptionKey: settings.qna?.subscriptionKey,
qnaRegion: settings.qna?.qnaRegion,
endpointKey: settings.qna?.endpointKey,
},
... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
function handleErrorButtonClick() {
navigateTo(`/bot/${projectId}/notifications`);
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
FunctionDeclaration |
async function handleOpenEmulator() {
return Promise.resolve(
openInEmulator(
botEndpoints[projectId] || 'http://localhost:3979/api/messages',
settings.MicrosoftAppId && settings.MicrosoftAppPassword
? { MicrosoftAppId: settings.MicrosoftAppId, MicrosoftAppPassword: settings.Microso... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
() => {
const [modalOpen, setModalOpen] = useState(false);
const [calloutVisible, setCalloutVisible] = useState(false);
const botActionRef = useRef(null);
const notifications = useNotifications();
const botName = useRecoilValue(botNameState);
const botStatus = useRecoilValue(botStatusState);
const dialo... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(startBot) => onboardingAddCoachMarkRef({ startBot }) | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(n) => n.severity === 'Error' | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(n) => n.severity === 'Warning' | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
() => {
if (projectId) {
getPublishStatus(projectId, defaultPublishConfig);
}
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
() => {
switch (botStatus) {
case BotStatus.failed:
openCallout();
stopPollingRuntime();
setBotStatus(BotStatus.pending);
break;
case BotStatus.published:
stopPollingRuntime();
handleLoadBot();
break;
case BotStatus.reloading:
startP... | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
() => {
stopPollingRuntime();
return;
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
() => {
// get publish status
getPublishStatus(projectId, defaultPublishConfig);
} | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(luisConfigKey) => config.luis[luisConfigKey] === '' | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(qnaConfigKey) => config.qna[qnaConfigKey] === '' | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ArrowFunction |
(dialog) => typeof dialog.content.recognizer === 'string' | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
MethodDeclaration |
formatMessage('Restart Bot') : formatMessage | 14squared/BotFramework-Composer | Composer/packages/client/src/components/TestController/TestController.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'exception-404',
template: ` <exception type="404" style="min-height: 500px; height: 80%; user-select: none;" desc="抱歉,您访问的页面不存在!"></exception> `
})
export class Exception404Component {} | jhkmnm/alainDemo5 | angular/src/app/routes/exception/404.component.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [
MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]),
],
controllers: [UserController],
providers: [UserService],
})
export class UserModule {} | ate-na/authnestjs | src/user/user.module.ts | TypeScript |
ArrowFunction |
() => {
const users = createStore<User[]>([
{
username: 'alice',
email: 'alice@example.com',
bio: '. . .',
},
{
username: 'bob',
email: 'bob@example.com',
bio: '~/ - /~',
},
{
username: 'carol',
email: 'carol@example.com',
bio: '- - -',
},... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
it('should pass typecheck', () => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as const,
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
}
... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as const,
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
}
expect(typecheck).toMatchInlineSnapsh... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as const,
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
(users, [id, field]) => users[id][field] || null | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id] as const,
//@ts-expect-error
fn: (users, [id, field]) => null,
})
return <div>{value}</div>
}
expect(typecheck).toMatchInlineSnap... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id] as const,
//@ts-expect-error
fn: (users, [id, field]) => null,
})
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
(users, [id, field]) => null | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
it('should pass typecheck', () => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as [number, keyof User],
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</d... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as [number, keyof User],
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
}
expect(typecheck).toMa... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field] as [number, keyof User],
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
//@ts-expect-error
keys: [id, field] as [number, keyof User],
fn: (users, [id, field]: [number, number]) => null,
})
//@ts-expect-error
return <... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({id, field}: Props) => {
const value = useStoreMap({
store: users,
//@ts-expect-error
keys: [id, field] as [number, keyof User],
fn: (users, [id, field]: [number, number]) => null,
})
//@ts-expect-error
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
(users, [id, field]: [number, number]) => null | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const UserProperty = ({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field],
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
}
expect(typecheck).toMatchInlineSnapshot(`
"
no error... | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({id, field}: Props) => {
const value = useStoreMap({
store: users,
keys: [id, field],
fn: (users, [id, field]) => users[id][field] || null,
})
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const store = createStore({foo: 0, bar: 'ok'})
const Foo = () => {
const value = useStoreMap(store, ({foo}) => foo)
return <div>{value}</div>
}
expect(typecheck).toMatchInlineSnapshot(`
"
no errors
"
`)
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
() => {
const value = useStoreMap(store, ({foo}) => foo)
return <div>{value}</div>
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ArrowFunction |
({foo}) => foo | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
TypeAliasDeclaration |
type User = {
username: string
email: string
bio: string
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
TypeAliasDeclaration |
type Props = {
id: number
field: keyof User
} | 5angel/effector | src/types/__tests__/effector-react/useStoreMap.test.tsx | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [EditComponent],
imports: [
CommonModule,
EditRoutingModule,
ComponentWrapperModule,
ReactiveFormsModule,
MatSelectModule,
MatAutocompleteModule,
MatButtonModule,
RestrictionFormModule,
CoreModule
]
})
export class EditModule {} | bcgov/embc-ess-mod | registrants/src/UI/embc-registrant/src/app/feature-components/edit/edit.module.ts | TypeScript |
ClassDeclaration |
export class PaymentSplitterFactory__factory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PaymentSplitterFactory> {
return super.deploy(overrides || {}) as Promise<PaymentSp... | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
deploy(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PaymentSplitterFactory> {
return super.deploy(overrides || {}) as Promise<PaymentSplitterFactory>;
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
getDeployTransaction(
overrides?: Overrides & { from?: string | Promise<string> }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
attach(address: string): PaymentSplitterFactory {
return super.attach(address) as PaymentSplitterFactory;
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
connect(signer: Signer): PaymentSplitterFactory__factory {
return super.connect(signer) as PaymentSplitterFactory__factory;
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
static createInterface(): PaymentSplitterFactoryInterface {
return new utils.Interface(_abi) as PaymentSplitterFactoryInterface;
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
MethodDeclaration |
static connect(
address: string,
signerOrProvider: Signer | Provider
): PaymentSplitterFactory {
return new Contract(
address,
_abi,
signerOrProvider
) as PaymentSplitterFactory;
} | levx-io/shoyu | test/typechain/factories/PaymentSplitterFactory__factory.ts | TypeScript |
ArrowFunction |
(state, action: PayloadAction<number>): void => {
const value = action.payload;
state.cash += value;
state.list.push({
id: state.list.length + 1,
value,
totalAfter: state.cash,
});
} | Saniol/CashflowGameAssistant | src/transactions/transactionsSlice.ts | TypeScript |
ArrowFunction |
(state, action: PayloadAction<ProffessionInitData>): void => {
const proffesionData = action.payload;
state.cash = proffesionData.income + proffesionData.savings;
state.list.length = 0;
} | Saniol/CashflowGameAssistant | src/transactions/transactionsSlice.ts | TypeScript |
InterfaceDeclaration |
interface TransactionI {
id: number;
value: number;
totalAfter: number;
} | Saniol/CashflowGameAssistant | src/transactions/transactionsSlice.ts | TypeScript |
InterfaceDeclaration |
interface TransactionsStateI {
cash: number;
list: TransactionI[];
} | Saniol/CashflowGameAssistant | src/transactions/transactionsSlice.ts | TypeScript |
FunctionDeclaration | // Vite doesnot export preview handler
export default function runExecutor(
schema: VitePreviewSchema,
context: ExecutorContext
) {
preflightCheck(context, schema.configFile);
schema.root =
schema.root ?? context.workspace.projects[context.projectName].root;
return eachValueFrom(startVitePreview(schema)... | LinbuduLab/nx-plugins | packages/nx-plugin-vite/src/executors/preview/preview.impl.ts | TypeScript |
ArrowFunction |
(res) => res | LinbuduLab/nx-plugins | packages/nx-plugin-vite/src/executors/preview/preview.impl.ts | TypeScript |
ClassDeclaration |
@SocketMiddleware()
export class UserConverterSocketMiddleware {
async use(@Args() args: any[]) {
let [user] = args;
// update Arguments
user = deserialize(user, {type: User, useAlias: true});
return [user];
}
} | AlexDede/tsed | docs/tutorials/snippets/socketio/socket-use-middleware.ts | TypeScript |
MethodDeclaration |
async use(@Args() args: any[]) {
let [user] = args;
// update Arguments
user = deserialize(user, {type: User, useAlias: true});
return [user];
} | AlexDede/tsed | docs/tutorials/snippets/socketio/socket-use-middleware.ts | TypeScript |
ClassDeclaration |
export default class App extends React.PureComponent<RouteComponentProps> {
public readonly state: IState = {
userInfo: utils.getUserInfo(),
};
public render() {
// due to hosting on gh pages there are some weird routing steps
const authCallbackRequest = this.props.location.pathname.startsWith(
... | fbjorn/spotify-dumper | src/components/App.tsx | TypeScript |
InterfaceDeclaration |
interface IState {
userInfo: IUserInfo;
} | fbjorn/spotify-dumper | src/components/App.tsx | TypeScript |
MethodDeclaration |
public render() {
// due to hosting on gh pages there are some weird routing steps
const authCallbackRequest = this.props.location.pathname.startsWith(
"/access_token",
);
const isLoggedIn = Boolean(this.state.userInfo.username);
return (
<div>
{authCallbackRequest ? (
... | fbjorn/spotify-dumper | src/components/App.tsx | TypeScript |
MethodDeclaration |
authCallbackRequest ? (
<Redirect
to={{
pathname: "/authCallback",
state: this | fbjorn/spotify-dumper | src/components/App.tsx | TypeScript |
ArrowFunction |
(params) => {
if (params.has('id')) {
this.title = 'Edit Attribute Group';
}
} | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
ArrowFunction |
attributeGroup => {
console.log('updateAttributeGroup response.body: ' + attributeGroup);
if (attributeGroup) {
this.attributeGroup = {};
}
} | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
ArrowFunction |
newAttributeGroup => {
console.log('addAttributeGroup response.body: ' + newAttributeGroup);
// this.addProduct.emit(newObjectType);
this.attributeGroup = {};
this.router.navigate(['/application/design/model']);
} | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'add-attribute-groups',
templateUrl: './add-attribute-groups.component.html',
styleUrls: ['./add-attribute-groups.component.scss']
})
export class AddAttributeGroupsComponent implements OnInit {
private attributeGroup: AttributeGroup;
private submitted = false;
private title = 'Add N... | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.attributeGroup = {};
this.route.paramMap.subscribe((params) => {
if (params.has('id')) {
this.title = 'Edit Attribute Group';
}
});
} | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
MethodDeclaration |
public onSubmit() {
if (this.attributeGroup.id) {
this.applicationSchemaService.updateAttributeGroup(this.attributeGroup)
.subscribe(attributeGroup => {
console.log('updateAttributeGroup response.body: ' + attributeGroup);
if (attributeGroup) {
this.attributeGroup = {... | akshay-misra-fullstack-solutions/seller-ecommerce-solution | ecom-bss-admin-web/src/main/web/angular-src/src/app/core/framework/design/model-schema/add-attribute-groups/add-attribute-groups.component.ts | TypeScript |
ClassDeclaration |
export default class ResourceLoader {
static loadResource(filePath: string) {
try {
const clazz = Require.default(filePath);
if (ResourceClazzMap.has(clazz)) {
const clazzInstance = Reflect.construct(clazz, ResourceClazzMap.get(clazz));
ResourceClas... | wuba/Umajs | packages/core/src/loader/ResourceLoader.ts | TypeScript |
MethodDeclaration |
static loadResource(filePath: string) {
try {
const clazz = Require.default(filePath);
if (ResourceClazzMap.has(clazz)) {
const clazzInstance = Reflect.construct(clazz, ResourceClazzMap.get(clazz));
ResourceClassMap.set(clazz, clazzInstance);
... | wuba/Umajs | packages/core/src/loader/ResourceLoader.ts | TypeScript |
MethodDeclaration |
static loadResourceDir(dirPath: string, ignoreDirs: string[] = []) {
if (!fs.existsSync(dirPath)) {
return;
}
loadDir(dirPath, ResourceLoader.loadResource, ignoreDirs);
} | wuba/Umajs | packages/core/src/loader/ResourceLoader.ts | TypeScript |
FunctionDeclaration | /**
* 根据每行最大字节数切分字符串
* @param text
* @param maxBytePreRow
*/
function splitByMaxBytePreRow(text: string, maxBytePreRow: number): string[] {
let rt = [];
let countPerCount = 0;
let strPreRow = "";
for (let i=0; i<text.length; i++) {
let len = (text.charCodeAt(i) > 127 || text.charCodeAt(i)===94) ? 2 : 1;... | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
FunctionDeclaration | /**
* 创建规则编辑器节点使用的label内容,标题固定占2行,操作符1行,值和单位1行
* @param title
* @param operation
* @param value
* @param unit
*/
export function getLabelTextForNode(title: string, operation?: string, value?: any, unit?: string) {
let titleWithRow = splitByMaxBytePreRow(title, 22);
// 指标标题占2行
let rt = [];
if(titleWithRow.... | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
FunctionDeclaration | /**
* 填充一个对象,保持对象本身的引用
* @param fillObj
* @param data
*/
export function fillObject(fillObj: any, data: any) {
for(let key in data) {
fillObj[key] = data[key];
}
} | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
FunctionDeclaration |
export function quotaCheck(variables: QuotaVariableStruct[], templateCode: number) {
// 自定义函数模板,直接忽略
if(templateCode === 13) {return true}
// 名单模板,特殊处理
if(templateCode === 7) {
if(variables.length !== 1) {
return "名单模板变量数量错误";
}
let variable = variables[0];
if(!variable.objectId) {
... | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
TypeAliasDeclaration |
type QuotaFilterStruct = {
objectId?: string,
valueType?: string,
operation?: string,
value?: string|number,
unit?: string,
connector: boolean, // true: and false: or
} | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
TypeAliasDeclaration |
type QuotaVariableStruct = {
subjectIds: string[],
windowWidth?: number,
windowWidthUnit?: string,
objectId?: string,
funcName?: string,
funcParam?: string,
operator?: string, // 名单专用
value?: any,
filters?: {
desc: string,
exp: string,
list: QuotaFilterStruct[]
},
connector?: s... | crazyworkDing/control-demo | src/utils/RuleUtils.ts | TypeScript |
ClassDeclaration |
export class Welcome {
@bindable value;
valueChanged(newValue, oldValue) {
//
}
} | TIHBS/blockchain-modelling-tool | src/resources/elements/welcome.ts | TypeScript |
MethodDeclaration |
valueChanged(newValue, oldValue) {
//
} | TIHBS/blockchain-modelling-tool | src/resources/elements/welcome.ts | TypeScript |
ClassDeclaration |
export class UpdateDormitoryDto extends PartialType(CreateDormitoryDto) {} | ASUDR/backend | src/dormitories/dto/update-dormitory.dto.ts | TypeScript |
ArrowFunction |
(
options: IImportNamedOptions,
): IImportNamed => ({
...create_element(ElementKind.ImportNamed),
...options,
}) | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
ArrowFunction |
(value: any): value is IImportNamed =>
is_element(value) && value.kind === ElementKind.ImportNamed | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
ArrowFunction |
(
element: IImportNamed,
path: IElement<any>[],
) =>
ts.createImportDeclaration(
/* decorators */ undefined,
/* modifiers */ undefined,
/* importClause */ element.members === undefined &&
element.default === undefined
? undefined
: ts.createImportClause(
/* nam... | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
ArrowFunction |
member => transform(member, path) as ts.ImportSpecifier | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
InterfaceDeclaration |
export interface IImportNamedOptions extends IElementOptions {
from: string;
default?: string;
members?: IImportMember[];
} | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
InterfaceDeclaration |
export interface IImportNamed
extends IElement<ElementKind.ImportNamed>,
IImportNamedOptions {} | ikatyang/dts-element | src/import-exports/import-named.ts | TypeScript |
FunctionDeclaration | /**
Framework objects in an Ember application (components, services, routes, etc.)
are created via a factory and dependency injection system. Each of these
objects is the responsibility of an "owner", which handled its
instantiation and manages its lifetime.
`getOwner` fetches the owner object responsible fo... | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
FunctionDeclaration | /**
`setOwner` forces a new owner on a given object instance. This is primarily
useful in some testing cases.
@method setOwner
@static
@for @ember/application
@param {Object} object An object instance.
@param {Object} object The new owner object of the object instance.
@since 2.3.0
@public
*/
export ... | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
InterfaceDeclaration | /**
@module @ember/application
*/
export interface LookupOptions {
singleton?: boolean;
instantiate?: boolean;
} | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
InterfaceDeclaration |
export interface FactoryClass {
positionalParams?: string | string[] | undefined | null;
} | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
InterfaceDeclaration |
export interface Factory<T, C extends FactoryClass | object = FactoryClass> {
class?: C;
name?: string;
fullName?: string;
normalizedName?: string;
create(props?: { [prop: string]: any }): T;
} | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
InterfaceDeclaration |
export interface EngineInstanceOptions {
mountPoint: string;
routable: boolean;
} | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
InterfaceDeclaration |
export interface Owner {
lookup<T>(fullName: string, options?: LookupOptions): T | undefined;
factoryFor<T, C>(fullName: string, options?: LookupOptions): Factory<T, C> | undefined;
factoryFor(fullName: string, options?: LookupOptions): Factory<any, any> | undefined;
buildChildEngineInstance(name: string, opti... | Angel-gc/ember.js | packages/@ember/-internals/owner/index.ts | TypeScript |
FunctionDeclaration | /**
* 10000 => "10,000"
* @param {number} num
*/
export function toThousandFilter(num: number): string {
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
} | wusshuang/vue-ts | src/filters/index.ts | TypeScript |
ArrowFunction |
m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ',') | wusshuang/vue-ts | src/filters/index.ts | TypeScript |
FunctionDeclaration |
function lagConfig(
enhet: string | undefined | null,
history: History,
settEnhet: (enhet: string) => void
): DecoratorProps {
const { sokFnr, pathFnr } = getFnrFraUrl();
const onsketFnr = sokFnr || pathFnr;
const fnrValue = onsketFnr === '0' ? RESET_VALUE : onsketFnr;
return {
appn... | navikt/modiapersonoversikt | src/app/internarbeidsflatedecorator/Decorator.tsx | TypeScript |
FunctionDeclaration | // TODO Jupp, dette er en superhack pga fnr i redux-state ikke blir satt tidlig nok.
// gjeldendeBruker.fnr burde fjernes fra state og hentes fra url slik at man har en single-point-of truth.
function useVenterPaRedux() {
const [klar, setKlar] = useState(false);
useOnMount(() => {
setKlar(true);
});... | navikt/modiapersonoversikt | src/app/internarbeidsflatedecorator/Decorator.tsx | TypeScript |
FunctionDeclaration |
function getPathnameFromUrl(): string {
const { pathname, hash } = window.location;
return removePrefix(pathname + hash, process.env.PUBLIC_URL, '/#', '#');
} | navikt/modiapersonoversikt | src/app/internarbeidsflatedecorator/Decorator.tsx | TypeScript |
FunctionDeclaration |
function getFnrFraUrl(): { sokFnr: string | null; pathFnr: string | null } {
const location = window.location;
const pathname = getPathnameFromUrl();
const queryParams = parseQueryString<{ sokFnr?: string }>(location.search);
const sakerUriMatch = matchPath<{ fnr: string }>(pathname, `${paths.sakerFul... | navikt/modiapersonoversikt | src/app/internarbeidsflatedecorator/Decorator.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.