本文整理汇总了TypeScript中lodash/assign.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: buildSharedQuery
buildSharedQuery(query){
let queryStr = this.state.getValue()
if(queryStr){
let queryBuilder = this.options.queryBuilder || SimpleQueryString
let simpleQuery = queryBuilder(
queryStr, assign(
{fields:this.options.queryFields},
this.options.queryOptions
)
)
let queries:Array<any> = [simpleQuery]
if (this.options.prefixQueryFields) {
let terms = String(queryStr).match(/\S+/g)
let prefixQueries:Array<any> = [MultiMatchQuery(terms.pop(), assign(
this.options.prefixQueryOptions, {
type:"phrase_prefix",
fields:this.options.prefixQueryFields,
})
)]
forEach(terms, function(q) {
prefixQueries.push(MultiMatchQuery(q, assign(
this.options.prefixQueryOptions, {
type:"phrase",
fields:this.options.prefixQueryFields,
})
))
}.bind(this))
queries.push(BoolMust(prefixQueries))
}
query = query.addQuery(BoolShould(queries))
if (this.options.addToFilters){
query = query.addSelectedFilter({
name: this.options.title,
value: queryStr,
id: this.key,
remove: () => this.state = this.state.clear()
})
} else {
query = query.setQueryString(queryStr)
}
return query
}
return query
}
开发者ID:teisman,项目名称:searchkit,代码行数:49,代码来源:QueryAccessor.ts
示例2: assign
.then(function(commandOptions: ServeTaskOptions) {
commandOptions = assign({}, commandOptions, {
baseURL: this.project.config(commandOptions.environment).baseURL || '/'
});
if (commandOptions.proxy) {
if (!commandOptions.proxy.match(/^(http:|https:)/)) {
var message = 'You need to include a protocol with the proxy URL.' + EOL + 'Try --proxy http://' + commandOptions.proxy;
return Promise.reject(new SilentError(message));
}
}
const ServeWebpackTask = (require('../tasks/serve-webpack.ts'))
var serve = new ServeWebpackTask({
ui: this.ui,
analytics: this.analytics,
project: this.project,
});
return win.checkWindowsElevation(this.ui).then(function() {
return serve.run(commandOptions);
});
}.bind(this));
开发者ID:TheLarkInn,项目名称:angular-cli,代码行数:25,代码来源:serve.ts
示例3: HasChildQuery
export function HasChildQuery(type, query, options={}){
return {
has_child:assign({
type, query
}, pick(options, allowedOptions))
}
}
开发者ID:Nostres,项目名称:searchkit-redux,代码行数:7,代码来源:HasChildQuery.ts
示例4: bootstrap
export const __reload = (m: {dev: typeof dev}) => {
// Bootstrap a second time with recovered if the state dev module was reloaded
if (dev.currentState !== m.dev.currentState) {
dev.currentState = m.dev.currentState;
bootstrap(App, [PROVIDERS, provideStore(reducers, assign({}, initialStates, dev.currentState))]);
}
};
开发者ID:rasenplanscher,项目名称:ng2-jspm-template,代码行数:7,代码来源:main.dev.ts
示例5: buildSharedQuery
buildSharedQuery(query){
let queryStr = this.state.getValue()
if(queryStr){
let simpleQuery = SimpleQueryString(
queryStr, assign(
{fields:this.options.queryFields},
this.options.queryOptions
)
)
let queries:Array<any> = [simpleQuery]
if (this.options.prefixQueryFields) {
queries.push(MultiMatchQuery(queryStr, {
type:"phrase_prefix",
fields:this.options.prefixQueryFields
}))
}
return query.addQuery(BoolShould(queries))
.setQueryString(queryStr)
}
return query
}
开发者ID:Baltox,项目名称:searchkit,代码行数:25,代码来源:QueryAccessor.ts
示例6: HasParentQuery
export function HasParentQuery(parent_type, query, options={}){
return {
has_parent:assign({
parent_type, query
}, pick(options, allowedOptions))
}
}
开发者ID:Nostres,项目名称:searchkit-redux,代码行数:7,代码来源:HasParentQuery.ts
示例7: NestedQuery
export function NestedQuery(path, filter, options={}){
return {
nested:assign({
path, filter
}, pick(options, allowedOptions))
}
}
开发者ID:Nostres,项目名称:searchkit-redux,代码行数:7,代码来源:NestedQuery.ts
示例8: QueryString
export function QueryString(query, options:QueryStringOptions={}){
if(!query){
return
}
return {
"query_string":assign({query}, options)
}
}
开发者ID:Eric013,项目名称:searchkit,代码行数:8,代码来源:QueryString.ts
示例9: SimpleQueryString
export function SimpleQueryString(query, options={}){
if(!query){
return
}
return {
"simple_query_string":assign({query}, options)
}
}
开发者ID:Baltox,项目名称:searchkit,代码行数:8,代码来源:SimpleQueryString.ts
示例10: forEach
forEach(terms, function(q) {
prefixQueries.push(MultiMatchQuery(q, assign(
this.options.prefixQueryOptions, {
type:"phrase",
fields:this.options.prefixQueryFields,
})
))
}.bind(this))
开发者ID:teisman,项目名称:searchkit,代码行数:8,代码来源:QueryAccessor.ts
注:本文中的lodash/assign.default函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论