mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-14 09:34:39 +00:00
Merge pull request #5486 from chocolatechipui/master
Updated types for ChocolateChipJS to 4.0.3.
This commit is contained in:
@@ -102,12 +102,14 @@ $('ul').insert("<li>1</li><li>2</li><li>3</li>", 3);
|
||||
$('ul').insert("<li>1</li><li>2</li><li>3</li>");
|
||||
$('ul').html('<li>1</li><li><2/li><li>3</li>');
|
||||
$('ul').html('');
|
||||
var listContent = $('ul').html();
|
||||
$('ul').prepend('<li class="title">The title</li>');
|
||||
$('ul').append('<li>The Last Item</li>');
|
||||
var inputName = $('input').attr('name');
|
||||
$('input').attr('name', 'wobba');
|
||||
var inputName = $('input').prop('name');
|
||||
$('input').prop('name', 'wobba');
|
||||
var inputProperty = $('input').prop('disabled');
|
||||
$('input[type=checked]').prop('checked', true);
|
||||
$('input').removeProp('disabled');
|
||||
$('input').hasAttr('disabled').css('border', 'solid 1px red');
|
||||
$('input').removeAttr('disabled');
|
||||
$('article').hasClass('current').css('display', 'block');
|
||||
|
||||
25
chocolatechipjs/chocolatechipjs.d.ts
vendored
25
chocolatechipjs/chocolatechipjs.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for chocolatechip v4.0.2
|
||||
// Type definitions for chocolatechip v4.0.3
|
||||
// Project: https://github.com/chocolatechipui/ChocolateChipJS
|
||||
// Definitions by: Robert Biggs <http://chocolatechip-ui.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -176,7 +176,8 @@ interface ChocolateChipStatic {
|
||||
* @param response The response from a Promise.
|
||||
* @result
|
||||
*/
|
||||
json(reponse: Response): JSON;
|
||||
json(reponse: Response): JSON;
|
||||
|
||||
/**
|
||||
* This method will defer the execution of a function until the call stack is clear.
|
||||
*
|
||||
@@ -198,7 +199,7 @@ interface ChocolateChipStatic {
|
||||
* This method makes sure a method always returns an array. If no values are available to return, it returns and empty array. This is to make sure that methods that expect a chainable array will not throw and exception.
|
||||
*
|
||||
* @param result The result of a method to test if it can be returned in an array.
|
||||
* @return An array hold the results of a method, otherwise an empty array.
|
||||
* @return An array holding the results of a method, otherwise an empty array.
|
||||
*/
|
||||
returnResult(result: HTMLElement[]): any[];
|
||||
|
||||
@@ -836,12 +837,12 @@ interface ChocolateChipElementArray extends Array<HTMLElement> {
|
||||
hasAttr(attributeName: string): ChocolateChipElementArray;
|
||||
|
||||
/**
|
||||
* Get the value of an attribute for the first element in the set of matched elements.
|
||||
* Test whether an attribute exists on the first element in the set of matched elements. The value returned is a boolean.
|
||||
*
|
||||
* @param attributeName The name of the attribute to get.
|
||||
* @return string
|
||||
* @return boolean
|
||||
*/
|
||||
prop(attributeName: string): string;
|
||||
prop(propertyName: string): boolean;
|
||||
|
||||
/**
|
||||
* Set an property for the set of matched elements.
|
||||
@@ -850,7 +851,15 @@ interface ChocolateChipElementArray extends Array<HTMLElement> {
|
||||
* @param value A string indicating the value to set the property to.
|
||||
* @return HTMLElement[]
|
||||
*/
|
||||
prop(propertyName: string, value: string): ChocolateChipElementArray;
|
||||
prop(propertyName: string, value: any | boolean): ChocolateChipElementArray;
|
||||
|
||||
/**
|
||||
* Remove an element property.
|
||||
*
|
||||
* @param property The property to remove.
|
||||
* @return HTMLElement[]
|
||||
*/
|
||||
removeProp(property: string): ChocolateChipElementArray;
|
||||
|
||||
/**
|
||||
* Adds the specified class(es) to each of the set of matched elements.
|
||||
@@ -1471,5 +1480,3 @@ interface Window {
|
||||
}
|
||||
declare var $: ChocolateChipStatic;
|
||||
declare var fetch: fetch;
|
||||
|
||||
declare var chocolatechipjs: ChocolateChipStatic;
|
||||
Reference in New Issue
Block a user