Skip to content

Commit

Permalink
Merge #849
Browse files Browse the repository at this point in the history
849: docs(Reference): Rearrange sc doc file for better dgeni parsing. r=davemneo a=afragapane

The order in which same-named items are parsed matters for dgeni. This ordering preserves all the
data we need.

#702


Co-authored-by: afragapane <ahfragapane@gmail.com>
  • Loading branch information
bors[bot] and afragapane committed Jan 3, 2019
2 parents d4d54f9 + 0257945 commit d396ded
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { MemberLikeExpression } from '../types';

class CryptoInterface extends BuiltinInterface {}
class CryptoValue extends BuiltinValueObject {
public readonly type = 'Crypto';
public readonly type = 'CryptoConstructor';
}

class HashOp extends BuiltinMemberCall {
Expand Down Expand Up @@ -88,10 +88,10 @@ class HashOp extends BuiltinMemberCall {

// tslint:disable-next-line export-name
export const add = (builtins: Builtins): void => {
builtins.addContractInterface('Crypto', new CryptoInterface());
builtins.addContractMember('Crypto', 'sha1', new HashOp('SHA1'));
builtins.addContractMember('Crypto', 'sha256', new HashOp('SHA256'));
builtins.addContractMember('Crypto', 'hash160', new HashOp('HASH160'));
builtins.addContractMember('Crypto', 'hash256', new HashOp('HASH256'));
builtins.addContractInterface('CryptoConstructor', new CryptoInterface());
builtins.addContractMember('CryptoConstructor', 'sha1', new HashOp('SHA1'));
builtins.addContractMember('CryptoConstructor', 'sha256', new HashOp('SHA256'));
builtins.addContractMember('CryptoConstructor', 'hash160', new HashOp('HASH160'));
builtins.addContractMember('CryptoConstructor', 'hash256', new HashOp('HASH256'));
builtins.addContractValue('crypto', new CryptoValue());
};
Loading

0 comments on commit d396ded

Please sign in to comment.