mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
# Conflicts: # acl/index.d.ts # angular-dynamic-locale/angular-dynamic-locale.d.ts # angular-signalr-hub/angular-signalr-hub-tests.ts # angular-signalr-hub/index.d.ts # angular-touchspin/angular-touchspin.d.ts # angularjs/angular-sanitize.d.ts # apn/apn.d.ts # aws-sdk/index.d.ts # babel-traverse/babel-traverse.d.ts # browser-sync/browser-sync.d.ts # bunyan-config/bunyan-config-tests.ts # cheap-ruler/cheap-ruler-tests.ts # connect-mongo/connect-mongo.d.ts # cropperjs/cropperjs-tests.ts # cropperjs/index.d.ts # ej.web.all/ej.web.all-tests.ts # ejs/ejs.d.ts # express-mung/express-mung-tests.ts # fbsdk/fbsdk-tests.ts # graphql/graphql-tests.ts # hapi-decorators/hapi-decorators-tests.ts # hapi-decorators/tsconfig.json # hapi/hapi-8.2.0.d.ts # hapi/hapi.d.ts # helmet/index.d.ts # hyperscript/hyperscript-tests.ts # jasmine/index.d.ts # jquery-alertable/jquery-alertable-tests.ts # jquery.pnotify/index.d.ts # klaw/klaw-tests.ts # koa-bodyparser/koa-bodyparser.d.ts # kue/index.d.ts # localforage-cordovasqlitedriver/localforage-cordovasqlitedriver-tests.ts # memwatch-next/memwatch-next-tests.ts # murmurhash3js/murmurhash3js-tests.ts # ng-file-upload/ng-file-upload.d.ts # ngeohash/ngeohash-tests.ts # node-schedule/node-schedule.d.ts # openlayers/openlayers-tests.ts # parse5/parse5.d.ts # parsimmon/parsimmon.d.ts # pem/pem-tests.ts # perfect-scrollbar/perfect-scrollbar-tests.ts # react-bootstrap-table/react-bootstrap-table.d.ts # react-router/react-router.d.ts # redux-devtools/redux-devtools.d.ts # restify/index.d.ts # rethinkdb/rethinkdb.d.ts # riot/riot-tests.ts # sat/sat-tests.ts # sequelize/sequelize.d.ts # shallowequal/shallowequal-tests.ts # spdy/spdy-tests.ts # swagger-jsdoc/swagger-jsdoc-tests.ts # through2/through2-tests.ts # through2/through2.d.ts # tilebelt/tilebelt-tests.ts # transducers-js/transducers-js-tests.ts # turf/turf-tests.ts # tz-format/tz-format-tests.ts # urlrouter/urlrouter.d.ts # vitalsigns/vitalsigns-tests.ts # weapp-api/weapp-api-tests.ts # webpack/webpack.d.ts # websocket/websocket.d.ts
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Variables
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
let shouldBeString: string;
|
|
let testInputText: string = 'TEST';
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Test sanitize service
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
declare let $sanitizeService: ng.sanitize.ISanitizeService;
|
|
shouldBeString = $sanitizeService(testInputText);
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Test `linky` filter
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
declare let $linky: ng.sanitize.filter.ILinky;
|
|
|
|
// Should be string for simple text and target parameters
|
|
shouldBeString = $linky(testInputText, testInputText);
|
|
|
|
// Should be string for simple text, target and attributes parameters
|
|
let attributesAsFunction = () => {
|
|
};
|
|
shouldBeString = $linky(shouldBeString, testInputText, {
|
|
"attributeKey1": "attributeValue1",
|
|
"attributeKey2": "attributeValue2"
|
|
});
|
|
shouldBeString = $linky(shouldBeString, testInputText, (url: string) => {
|
|
return {"attributeKey1": "attributeValue1"}
|
|
}); |